Skip to content

Commit 74e0b22

Browse files
committed
Fix the array API __len__ method
Original NumPy Commit: 2fe8643cce651fa2ada5619f85e3cc16524d4076
1 parent f1cce7a commit 74e0b22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

array_api_strict/_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)