Data type objects (dtype)

Data type objects (dtype)

A data type object (an instance of numpy.dtype class) describes how the bytes in the fixed-size block of memory corresponding to an array item should be interpreted. It describes the following aspects of the data:

  1. Type of the data (integer, float, Python object, etc.)
  2. Size of the data (how many bytes is in e.g. the integer)
  3. Byte order of the data (little-endian or big-endian)
  4. If the data type is structured, an aggregate of other data types, (e.g., describing an array item consisting of an integer and a float),
    1. what are the names of the “fields” of the structure, by which they can be 登录查看完整内容