jax.numpy.isdtype#
- jax.numpy.isdtype(dtype, kind)[源代码][源代码]#
返回一个布尔值,指示提供的 dtype 是否属于指定类型。
- 参数:
dtype (DTypeLike) – 输入数据类型
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。
- 返回:
真或假
- 返回类型: