jax.numpy.isdtype#
- jax.numpy.isdtype(dtype, kind)[源代码]#
返回一个布尔值,指示提供的 dtype 是否属于指定的类型。
- 参数:
dtype (DTypeLike) – 输入的 dtype
kind (str | DTypeLike | tuple[str | DTypeLike, ...]) –
数据类型种类。 如果
kind
类似于 dtype,则返回dtype = kind
。 如果kind
是一个字符串,则如果 dtype 属于指定的类别,则返回 True'bool'
:{bool}
'signed integer'
:{int4, int8, int16, int32, int64}
'unsigned integer'
:{uint4, uint8, uint16, uint32, uint64}
'integral'
:('signed integer', 'unsigned integer')
的简写'real floating'
:{float8_*, float16, bfloat16, float32, float64}
'complex floating'
:{complex64, complex128}
'numeric'
:('integral', 'real floating', 'complex floating')
的简写
如果
kind
是一个元组,则如果 dtype 与元组的任何条目匹配,则返回 True。
- 返回:
True 或 False
- 返回类型: