You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If ``kind`` is a dtype, the function must return a boolean indicating whether the input ``dtype`` is equal to the dtype specified by ``kind``.
142
+
- If ``kind`` is a string, the function must return a boolean indicating whether the input ``dtype`` is of a specified data type kind. The following dtype kinds must be supported:
143
+
144
+
- **bool**: boolean data types (e.g., ``bool``).
145
+
- **signed integer**: signed integer data types (e.g., ``int8``, ``int16``, ``int32``, ``int64``).
- **integral**: integer data types. Shorthand for ``('signed integer', 'unsigned integer')``.
148
+
- **real floating**: real-valued floating-point data types (e.g., ``float32``, ``float64``).
149
+
- **complex floating**: complex floating-point data types (e.g., ``complex64``, ``complex128``).
150
+
- **numeric**: numeric data types. Shorthand for ``('integral', 'real floating', 'complex floating')``.
151
+
152
+
- If ``kind`` is a tuple, the tuple specifies a union of dtypes and/or kinds, and the function must return a boolean indicating whether the input ``dtype`` is either equal to a specified dtype or belongs to at least one specified data type kind.
153
+
154
+
.. note::
155
+
A conforming implementation of the array API standard is **not** limited to only including the dtypes described in this specification in the required data type kinds. For example, implementations supporting ``float16`` and ``bfloat16`` can include ``float16`` and ``bfloat16`` in the ``real floating`` data type kind. Similarly, implementations supporting ``int128`` can include ``int128`` in the ``signed integer`` data type kind.
156
+
157
+
In short, conforming implementations may extend data type kinds; however, data type kinds must remain consistent (e.g., only integer dtypes may belong to integer data type kinds and only floating-point dtypes may belong to floating-point data type kinds), and extensions must be clearly documented as such in library documentation.
158
+
159
+
Returns
160
+
-------
161
+
out: bool
162
+
boolean indicating whether a provided dtype is of a specified data type kind.
0 commit comments