diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-08-06 16:48:16 -0600 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-08-06 16:48:16 -0600 |
| commit | 2fe8643cce651fa2ada5619f85e3cc16524d4076 (patch) | |
| tree | 8e908f4cceb7e556fd1bf56d07103abef127b55e /numpy/array_api | |
| parent | 5c7074f90ee7093f231816cb356cb787e0f22802 (diff) | |
| download | numpy-2fe8643cce651fa2ada5619f85e3cc16524d4076.tar.gz | |
Fix the array API __len__ method
Diffstat (limited to 'numpy/array_api')
| -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 364b88f89..00f50eade 100644 --- a/numpy/array_api/_array_object.py +++ b/numpy/array_api/_array_object.py @@ -468,8 +468,7 @@ class Array: """ Performs the operation __len__. """ - res = self._array.__len__() - return self.__class__._new(res) + return self._array.__len__() def __lshift__(self: Array, other: Union[int, Array], /) -> Array: """ |
