Skip to content

Commit 9503db0

Browse files
committed
Add default_complex when xp.asarray isn't present
1 parent 83f0bcd commit 9503db0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

array_api_tests/dtype_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ class MinMax(NamedTuple):
235235
if not hasattr(xp, "asarray"):
236236
default_int = xp.int32
237237
default_float = xp.float32
238+
default_complex = xp.complex64 if api_version > "2021.12" else None
238239
warn(
239240
"array module does not have attribute asarray. "
240241
"default int is assumed int32, default float is assumed float32"

0 commit comments

Comments
 (0)