Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

NumPy Data type: issubclass_() function

numpy.issubclass_() function

The issubclass_() function is used to determine if a class is a subclass of a second class.

issubclass_ is equivalent to the Python built-in issubclass, except that it returns False instead of raising a TypeError if one of the arguments is not a class.

Version: 1.15.0

Syntax:

numpy.issubclass_(arg1, arg2)

Parameter:

Name Description Required /
Optional
arg1 : class Input class. True is returned if arg1 is a subclass of arg2. Required
arg2 : class or tuple of classes Input class. If a tuple of classes, True is returned if arg1 is a subclass of any of the tuple elements. Required

Return value:

out : bool - Whether arg1 is a subclass of arg2 or not.

Example: numpy.issubclass() function

>>> import numpy as np
>>> np.issubclass_(np.int32, int)
False
>>> np.issubclass_(np.int32, float)
False

Previous: issubsctype()
Next: find_common_type()