From e4b7205fbaece2b604b0ac2b11a586a9f7c6b3dd Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Fri, 23 Jul 2021 14:17:09 -0600 Subject: Fix the array API Array.__setitem__ --- numpy/_array_api/_array_object.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/_array_api/_array_object.py') 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: """ -- cgit v1.2.1