Skip to content

Commit 94a24c8

Browse files
authored
Make it clearer that the dtype kinds in isdtype are the string inputs (#610)
1 parent 3612edc commit 94a24c8

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/array_api_stubs/_2022_12/data_type_functions.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ def isdtype(
148148
- If ``kind`` is a dtype, the function must return a boolean indicating whether the input ``dtype`` is equal to the dtype specified by ``kind``.
149149
- 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:
150150
151-
- **bool**: boolean data types (e.g., ``bool``).
152-
- **signed integer**: signed integer data types (e.g., ``int8``, ``int16``, ``int32``, ``int64``).
153-
- **unsigned integer**: unsigned integer data types (e.g., ``uint8``, ``uint16``, ``uint32``, ``uint64``).
154-
- **integral**: integer data types. Shorthand for ``('signed integer', 'unsigned integer')``.
155-
- **real floating**: real-valued floating-point data types (e.g., ``float32``, ``float64``).
156-
- **complex floating**: complex floating-point data types (e.g., ``complex64``, ``complex128``).
157-
- **numeric**: numeric data types. Shorthand for ``('integral', 'real floating', 'complex floating')``.
151+
- ``'bool'``: boolean data types (e.g., ``bool``).
152+
- ``'signed integer'``: signed integer data types (e.g., ``int8``, ``int16``, ``int32``, ``int64``).
153+
- ``'unsigned integer'``: unsigned integer data types (e.g., ``uint8``, ``uint16``, ``uint32``, ``uint64``).
154+
- ``'integral'``: integer data types. Shorthand for ``('signed integer', 'unsigned integer')``.
155+
- ``'real floating'``: real-valued floating-point data types (e.g., ``float32``, ``float64``).
156+
- ``'complex floating'``: complex floating-point data types (e.g., ``complex64``, ``complex128``).
157+
- ``'numeric'``: numeric data types. Shorthand for ``('integral', 'real floating', 'complex floating')``.
158158
159159
- 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.
160160

src/array_api_stubs/_draft/data_type_functions.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ def isdtype(
164164
- If ``kind`` is a dtype, the function must return a boolean indicating whether the input ``dtype`` is equal to the dtype specified by ``kind``.
165165
- 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:
166166
167-
- **bool**: boolean data types (e.g., ``bool``).
168-
- **signed integer**: signed integer data types (e.g., ``int8``, ``int16``, ``int32``, ``int64``).
169-
- **unsigned integer**: unsigned integer data types (e.g., ``uint8``, ``uint16``, ``uint32``, ``uint64``).
170-
- **integral**: integer data types. Shorthand for ``('signed integer', 'unsigned integer')``.
171-
- **real floating**: real-valued floating-point data types (e.g., ``float32``, ``float64``).
172-
- **complex floating**: complex floating-point data types (e.g., ``complex64``, ``complex128``).
173-
- **numeric**: numeric data types. Shorthand for ``('integral', 'real floating', 'complex floating')``.
167+
- ``'bool'``: boolean data types (e.g., ``bool``).
168+
- ``'signed integer'``: signed integer data types (e.g., ``int8``, ``int16``, ``int32``, ``int64``).
169+
- ``'unsigned integer'``: unsigned integer data types (e.g., ``uint8``, ``uint16``, ``uint32``, ``uint64``).
170+
- ``'integral'``: integer data types. Shorthand for ``('signed integer', 'unsigned integer')``.
171+
- ``'real floating'``: real-valued floating-point data types (e.g., ``float32``, ``float64``).
172+
- ``'complex floating'``: complex floating-point data types (e.g., ``complex64``, ``complex128``).
173+
- ``'numeric'``: numeric data types. Shorthand for ``('integral', 'real floating', 'complex floating')``.
174174
175175
- 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.
176176

0 commit comments

Comments
 (0)