Skip to content

Commit

Permalink
fix array.py: fixing a small bug in Array.size which was causing an…
Browse files Browse the repository at this point in the history
… infinite recursion due to self-reference.
  • Loading branch information
YushaArif99 committed Oct 29, 2024
1 parent 4db6680 commit 1d625ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ivy/data_classes/array/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def shape(self) -> ivy.Shape:
@property
def size(self) -> Optional[int]:
"""Number of elements in the array."""
return ivy.size(self)
return ivy.size(self._data)

@property
def itemsize(self) -> Optional[int]:
Expand Down

0 comments on commit 1d625ca

Please sign in to comment.