numpy.issubclass_() function – Python (original) (raw)
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
Similar Reads
- Python | numpy.issubsctype() function numpy.issubsctype() function is used to determine whether the first argumentis a subclass of the second argument.If the first argument is a subclass of the second argument it returns true, otherwise it returns false. Syntax : numpy.issubsctype(arg1, arg2) Parameters : arg1, arg2 : dtype or dtype spe 1 min read
- Python | numpy.issubdtype() function numpy.issubdtype() function is used to determine whether the first argument is a typecode lower/equal in type hierarchy from second argument.If the first argument is lower or equal it returns true, otherwise it returns false. Syntax : numpy.issubdtype(arg1, arg2) Parameters : arg1, arg2 : [dtype_lik 1 min read
- Python | numpy.issctype() function numpy.issctype() function is used to determine whether the given object represents a scalar data-type.If the given object represents a scalar data-type it returns true, otherwise it returns false. Syntax : numpy.issctype(rep) Parameters : rep : any input. Return : [bool] Boolean result of check whet 1 min read
- numpy.ma.is_mask() function | Python numpy.ma.is_mask() function return True if parameter m is a valid, standard mask. This function does not check the contents of the input, only that the type is MaskType. In particular, this function returns False if the mask has a flexible dtype. Syntax : numpy.ma.is_mask(m) Parameter : m : [array_l 1 min read
- numpy.isscalar() in Python In this article, we will elucidate the `numpy.isscalar()` function through a well-documented code example and comprehensive explanation. Python numpy.isscalar() Syntax Syntax : numpy.isscalar(element) Parameters: element: The input element to be checked for scalar properties.Return Type: bool: Retur 3 min read
- numpy.ma.is_masked() function | Python numpy.ma.is_masked() function determine whether input has masked values & accepts any object as input, but always returns False unless the input is a MaskedArray containing masked values. Syntax : numpy.ma.is_masked(arr) Parameters : arr : [array_like] Array to check for masked values. Return : 1 min read
- numpy.info() function in Python In Numpy we can get all the information about the function, class, or module like what will the parameter and what will be the type of the return value with the help of numpy.info() function. This function returns the help information for a function, class, or module. Syntax: numpy.info(numpy.info(o 1 min read
- numpy.dtype.kind() function – Python numpy.dtype.kind() function determine the character code by identifying the general kind of data. Syntax : numpy.dtype.kind(type) Parameters : type : [dtype] The input data-type. Return : Return the character code by identifying the general kind of data. Code #1 : # Python program explaining # numpy 1 min read
- id() function in Python In Python, id() function is a built-in function that returns the unique identifier of an object. The identifier is an integer, which represents the memory address of the object. The id() function is commonly used to check if two variables or objects refer to the same memory location. Python id() Fun 3 min read
- Python issubclass() We know that inheritance is one of the building blocks of the Object-Oriented Programming concept. One class can derive or inherit the properties from some other class. It also provides the reusability of code. We don’t have to write the same code again and again. Also, it allows us to add more feat 3 min read