Skip to content

Commit 62a222e

Browse files
committed
MAINT: simplify running tests with SKIP_DTYPES=float64
With this, $ ARRAY_API_TESTS_MODULE=array_api_compat.torch ARRAY_API_TESTS_SKIP_DTYPES=uint16,uint32,uint64,float64,complex128 pytest array_api_tests/ --skips-file=../array-api-compat/torch-xfails.txt -v is passing modulo some minor failures in test_signatures.py
1 parent 66e8cad commit 62a222e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

array_api_tests/test_data_type_functions.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ def float32(n: Union[int, float]) -> float:
2424

2525

2626
def _float_match_complex(complex_dtype):
27-
return xp.float32 if complex_dtype == xp.complex64 else xp.float64
27+
if complex_dtype == xp.complex64:
28+
return xp.float32
29+
elif complex_dtype == xp.complex128:
30+
return xp.float64
31+
else:
32+
return dh.default_float
2833

2934

3035
@given(

0 commit comments

Comments
 (0)