Data type Description
bool Boolean type storing True and False values
object Python object type
string_ Fixed-length string type (1 byte per character). To create e.g. a string dtype with length 8, use 'S8'
unicode_ Fixed-length unicode type (number of bytes platform specific). Same specification semantics as string_ (e.g. 'U10')
Example:
>>> a = np.array(["42","34","15"]) >>> a array(['42', '34', '15'], dtype='|S2') >>> a = np.array(["42","34","150"]) >>> a array(['42', '34', '150'], dtype='|S3')