diff options
Diffstat (limited to 'numpy')
-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: """ |