figure - the numpy ndarray object numpy dtype hierarchy you may occasionally have code which needs to check whether an array contains integersfloating point numbersstringsor python objects because there are many types of floating point numbers (float through float )checking that the dtype is among list of types would be very verbose fortunatelythe dtypes have superclasses such as np integer and np floating which can be used in conjunction with the np issubd type functionin [ ]ints np ones( dtype=np uint in [ ]floats np ones( dtype=np float in [ ]np issubdtype(ints dtypenp integerout[ ]true in [ ]np issubdtype(floats dtypenp floatingout[ ]true you can see all of the parent classes of specific dtype by calling the type' mro methodin [ ]np float mro(out[ ][numpy float numpy floatingnumpy inexactnumpy numbernumpy genericfloatobjectmost numpy users will never have to know about thisbut it occasionally comes in handy see figure - for graph of the dtype hierarchy and parent-subclass relationships some of the dtypes have trailing underscores in their names these are there to avoid variable name conflicts between the numpy-specific types and the python built-in ones advanced numpy www it-ebooks info