Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Nov 24, 2024
1 parent 2092801 commit ac61fae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zarr/codecs/_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@


def ensure_contiguous(arr: NDArrayLike) -> NDArrayLike:
if arr.flags.c_contiguous or arr.flags.f_contiguous:
flags = getattr(arr, "flags", None)
if flags is not None and (flags.c_contiguous or flags.f_contiguous):
return arr
else:
return arr.copy()
Expand Down

0 comments on commit ac61fae

Please sign in to comment.