Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions array_api_tests/dtype_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,16 @@ def accumulation_result_dtype(x_dtype, dtype_kwarg):
default_float = xp.asarray(float()).dtype
if default_float not in real_float_dtypes:
warn(f"inferred default float is {default_float!r}, which is not a float")
if api_version > "2021.12":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about removing this. This is the check that's currently done throughout the suite to check for complex support.

Maybe we should instead make sure that ARRAY_API_TESTS_SKIP_DTYPES works correctly for complex dtypes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I readded the version check and added a check that no complex types are requested to be skipped.


if not (hasattr(xp, "complex32") or hasattr(xp, "complex64")):
default_complex = None
else:
default_complex = xp.asarray(complex()).dtype
if default_complex not in complex_dtypes:
warn(
f"inferred default complex is {default_complex!r}, "
"which is not a complex"
)
else:
default_complex = None

if dtype_nbits[default_int] == 32:
default_uint = _name_to_dtype.get("uint32")
Expand Down
Loading