dpnp.isdtype
- dpnp.isdtype(dtype, kind)[source]
Returns a boolean indicating whether a provided dtype is of a specified data type kind.
- Parameters:
dtype (dtype) -- The input dtype.
kind ({dtype, str, tuple of dtypes or strs}) --
The input dtype or dtype kind. Allowed dtype kinds are:
'bool': boolean kind'signed integer': signed integer data types'unsigned integer': unsigned integer data types'integral': integer data types'real floating': real-valued floating-point data types'complex floating': complex floating-point data types'numeric': numeric data types
- Returns:
out -- A boolean indicating whether a provided dtype is of a specified data type kind.
- Return type:
See also
dpnp.issubdtypeTest if the first argument is a type code lower/equal in type hierarchy.
Examples
>>> import dpnp as np >>> np.isdtype(np.float32, np.float64) False >>> np.isdtype(np.float32, "real floating") True >>> np.isdtype(np.complex128, ("real floating", "complex floating")) True