at.set rnethods return modified copies of read-only NumPy arrays, but they raise for read-only array_api_strict arrays.
import array_api_extra as xpx
import array_api_strict as xp
# import numpy as xp # NumPy works
x = xp.zeros(())
x = xp.broadcast_to(x, (2,))
x = xpx.at(x)[0].set(1)
# ValueError: assignment destination is read-only
While we're at it, what do you think about making ... a default value for the second argument/index of at?
at.setrnethods return modified copies of read-only NumPy arrays, but they raise for read-onlyarray_api_strictarrays.While we're at it, what do you think about making
...a default value for the second argument/index ofat?