NumPy

Previous topic

numpy.issctype

Next topic

numpy.issubsctype

This is documentation for an old release of NumPy (version 1.18). Read this page in the documentation of the latest stable release (version 2.2).

numpy.issubdtype

numpy.issubdtype(arg1, arg2)[source]

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

Parameters
arg1, arg2dtype_like

dtype or string representing a typecode.

Returns
outbool

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