We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2092801 commit ac61faeCopy full SHA for ac61fae
src/zarr/codecs/_v2.py
@@ -18,7 +18,8 @@
18
19
20
def ensure_contiguous(arr: NDArrayLike) -> NDArrayLike:
21
- if arr.flags.c_contiguous or arr.flags.f_contiguous:
+ flags = getattr(arr, "flags", None)
22
+ if flags is not None and (flags.c_contiguous or flags.f_contiguous):
23
return arr
24
else:
25
return arr.copy()
0 commit comments