Test whether a data type belongs to a category.
Numeric.dtype.check(dtype, category = 'numeric')Matches the type against the category members.
- Parameters:
dtype: Data type name to testcategory: Category the type is tested against
- Returns: True when the type belongs to the category
- NumPy: Covers
np.isdtype,np.issubdtype,np.isfortranthrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const result = Numeric.dtype.check('int32', 'integer')
console.log(result)
// trueimport Numeric from '@neabyte/numerix'
const result = Numeric.dtype.check('float32', 'floating')
console.log(result)
// trueimport Numeric from '@neabyte/numerix'
const result = Numeric.dtype.check('int32', 'floating')
console.log(result)
// falseimport Numeric from '@neabyte/numerix'
const result = Numeric.dtype.check('int32')
console.log(result)
// true