Skip to content

Commit

Permalink
Depend on np.array for array coercions
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Aug 22, 2024
1 parent 35d022c commit c88a6c7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions zarr/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,7 @@ def __eq__(self, other):
)

def __array__(self, dtype=None, copy=None):
a = self[...]
if dtype is not None:
a = a.astype(dtype=dtype)

if copy is not None and copy:
return a.copy()
return a
return np.array(self[...], dtype=dtype, copy=copy)

def islice(self, start=None, end=None):
"""
Expand Down

0 comments on commit c88a6c7

Please sign in to comment.