We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
default_complex
1 parent 9503db0 commit ffeb7cbCopy full SHA for ffeb7cb
array_api_tests/dtype_helpers.py
@@ -235,7 +235,12 @@ class MinMax(NamedTuple):
235
if not hasattr(xp, "asarray"):
236
default_int = xp.int32
237
default_float = xp.float32
238
- default_complex = xp.complex64 if api_version > "2021.12" else None
+ # TODO: when api_version > '2021.12', just assign to xp.complex64,
239
+ # otherwise default to None. Need array-api spec to be bumped first (#187).
240
+ try:
241
+ default_complex = xp.complex64
242
+ except AttributeError:
243
+ default_complex = None
244
warn(
245
"array module does not have attribute asarray. "
246
"default int is assumed int32, default float is assumed float32"
0 commit comments