dtype.shape

dtype.shape Shape tuple of the sub-array if this data type describes a sub-array, and () otherwise.

dtype.num

dtype.num A unique number for each of the 21 different built-in types. These are roughly ordered from least-to-most precision.

dtype.newbyteorder()

dtype.newbyteorder(new_order='S') Return a new dtype with a different byte order. Changes are also made in all fields and sub-arrays of the data type. Parameters: new_order : string, optional Byte order to force; a value from the byte order specifications below. The default value (?S?) results in swapping the current byte order. new_order codes can be any of: ?S? - swap dtype from current to opposite endian {?<?, ?L?} - little endian {?>?, ?B?} - big endian {?=?, ?N?} - native order

dtype.names

dtype.names Ordered list of field names, or None if there are no fields. The names are ordered according to increasing byte offset. This can be used, for example, to walk through all of the named fields in offset order. Examples >>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))]) >>> dt.names ('name', 'grades')

dtype.name

dtype.name A bit-width name for this data-type. Un-sized flexible data-type objects do not have this attribute.

dtype.metadata

dtype.metadata

dtype.kind

dtype.kind A character code (one of ?biufcmMOSUV?) identifying the general kind of data. b boolean i signed integer u unsigned integer f floating-point c complex floating-point m timedelta M datetime O object S (byte-)string U Unicode V void

dtype.itemsize

dtype.itemsize The element size of this data-type object. For 18 of the 21 types this number is fixed by the data-type. For the flexible data-types, this number can be anything.

dtype.isnative

dtype.isnative Boolean indicating whether the byte order of this dtype is native to the platform.

dtype.isbuiltin

dtype.isbuiltin Integer indicating how this dtype relates to the built-in dtypes. Read-only. 0 if this is a structured array type, with fields 1 if this is a dtype compiled into numpy (such as ints, floats etc) 2 if the dtype is for a user-defined numpy type A user-defined type uses the numpy C-API machinery to extend numpy to handle a new array type. See User-defined data-types in the Numpy manual. Examples >>> dt = np.dtype('i2') >>> dt.isbuiltin 1 >>> dt = np.d