def _setup_dtype(self):
if self._dtype is not None:<EOL><INDENT>return self._dtype<EOL><DEDENT>dtype = []  <EOL>for i, typ in enumerate(self.typlist):<EOL><INDENT>if typ in self.NUMPY_TYPE_MAP:<EOL><INDENT>dtype.append(('<STR_LIT:s>' + str(i), self.byteorder +<EOL>self.NUMPY_TYPE_MAP[typ]))<EOL><DEDENT>else:<EOL><INDENT>dtype.append(('<STR_LIT:s>' + str(i), '<STR_LIT:S>' + str(typ)))<EOL><DEDENT><DEDENT>dtype = np.dtype(dtype)<EOL>self._dtype = dtype<EOL>return self._dtype<EOL>
Map between numpy and state dtypes