w3resource

Numpy Data type: issubsctype() function

numpy.issubsctype() function

The issubsctype() function is used to determine if the first argument is a subclass of the second argument.

Version: 1.15.0

Syntax:

numpy.issubsctype(arg1, arg2)

Parameter:

Name Description Required /
Optional
arg1, arg2 : dtype or dtype specifier Data-types. Required

Return value:

out : bool - The result.

Example: numpy.issubsctype() function

>>> import numpy as np
>>> np.issubsctype('S4', str)
False
>>> np.issubsctype('S8', str)
False
>>> np.issubsctype(np.array([1]), int)
True
>>> np.issubsctype(np.array([1]), float)
False

Python Code Editor:

Previous: issubdtype()
Next: issubclass_()



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/numpy/data-type-routines/issubsctype.php