W3cubDocs

/NumPy 1.17

numpy.issubdtype

numpy.issubdtype(arg1, arg2) [source]

Returns True if first argument is a typecode lower/equal in type hierarchy.

Parameters:
arg1, arg2 : dtype_like

dtype or string representing a typecode.

Returns:
out : bool

See also

issubsctype, issubclass_

numpy.core.numerictypes
Overview of numpy type hierarchy.

Examples

>>> np.issubdtype('S1', np.string_)
True
>>> np.issubdtype(np.float64, np.float32)
False

© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.issubdtype.html