Skip to content

Commit 2fe8643

Browse files
committed
Fix the array API __len__ method
1 parent 5c7074f commit 2fe8643

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

numpy/array_api/_array_object.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ def __len__(self, /) -> int:
468468
"""
469469
Performs the operation __len__.
470470
"""
471-
res = self._array.__len__()
472-
return self.__class__._new(res)
471+
return self._array.__len__()
473472

474473
def __lshift__(self: Array, other: Union[int, Array], /) -> Array:
475474
"""

0 commit comments

Comments
 (0)