diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-23 14:17:09 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-23 14:17:09 -0600 |
commit | e4b7205fbaece2b604b0ac2b11a586a9f7c6b3dd (patch) | |
tree | 0151ca86e21c6dba1b7dfe5214bddfd99d643441 | |
parent | e7f6dfecccc9dc84520af1a9f0000b3b0d0f4895 (diff) | |
download | numpy-e4b7205fbaece2b604b0ac2b11a586a9f7c6b3dd.tar.gz |
Fix the array API Array.__setitem__
-rw-r--r-- | numpy/_array_api/_array_object.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index cd16f49ee..13b093f4f 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -608,8 +608,7 @@ class Array: # Note: Only indices required by the spec are allowed. See the # docstring of _validate_index key = self._validate_index(key, self.shape) - res = self._array.__setitem__(key, asarray(value)._array) - return self.__class__._new(res) + self._array.__setitem__(key, asarray(value)._array) def __sub__(self: Array, other: Union[int, float, Array], /) -> Array: """ |