Skip to content

Commit 451ff21

Browse files
author
Thomas Zilio
committed
fix: Compatibility with latest dask versions and environment requirements pinning.
1 parent e269c1c commit 451ff21

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

conda/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ dependencies:
1616
- sphinx-gallery
1717
- sphinx-inline-tabs
1818
- xarray
19-
- zarr>=2.11.0
19+
- zarr>=2.11.0,<3

zcollection/variable/array.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def _as_numpy_array(
3838
with masked data replaced by its fill value and the fill value of the
3939
offered masked array. Otherwise, the provided array and fill value.
4040
"""
41+
if isinstance(arr, dask.array.core.Array):
42+
arr = arr.compute()
43+
4144
result: NDArray = numpy.asanyarray(arr)
4245
if isinstance(result, numpy.ma.MaskedArray):
4346
if fill_value is not None and not_equal(fill_value, result.fill_value):

0 commit comments

Comments
 (0)