numpy.issubclass_() function – Python
Last Updated :
18 Jun, 2020
numpy.issubclass_()
function is used to determine whether a class is a subclass of a second class.
Syntax : numpy.issubclass_(arg1, arg2)
Parameters :
arg1 : [class] Input class. True is returned if arg1 is a subclass of arg2.
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.
Return : [bool] Boolean result. Whether arg1 is a subclass of arg2 or not.
Code #1 :
import numpy as geek
gfg = geek.issubclass_(geek.int32, float )
print (gfg)
|
Output :
False
Code #2 :
import numpy as geek
gfg = geek.issubclass_(geek.float64, float )
print (gfg)
|
Output :
True
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...