-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
low priorityLow priority issueLow priority issue
Description
numpy returns scalars instead of 0d arrays:
import numpy as np
import array_api_strict as xps
xps.mean(xps.asarray(4, dtype=xps.float32)).__iadd__(1)
np.mean(np.asarray(4, dtype=np.float32)).__iadd__(1) # AttributeError: 'numpy.float32' object has no attribute '__iadd__'
And this causes errors in unrelated tests since inplace operators are used in more generic tests:
ignore_mask |= out_zero_mask |
I don't think using inplace-operators in this case is particularly important and can probably be switched to a normal bitwise or.
xref: numpy/numpy#27305
Metadata
Metadata
Assignees
Labels
low priorityLow priority issueLow priority issue