Skip to content

Commit a375e9d

Browse files
committed
Test complex dtypes in test_isdtype
1 parent fa772de commit a375e9d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

array_api_compat/common/_aliases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ def isdtype(
481481
"""
482482
Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``.
483483
484+
Note that outside of this function, this compat library does not yet fully
485+
support complex numbers.
486+
484487
See
485488
https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html
486489
for more details

tests/test_isdtype.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def _spec_dtypes(library):
1414
# torch does not have unsigned integer dtypes
1515
return {
1616
'bool',
17+
'complex64',
18+
'complex128',
1719
'uint8',
1820
'int8',
1921
'int16',
@@ -25,6 +27,8 @@ def _spec_dtypes(library):
2527
else:
2628
return {
2729
'bool',
30+
'complex64',
31+
'complex128',
2832
'float32',
2933
'float64',
3034
'int16',

0 commit comments

Comments
 (0)