Skip to content

Commit

Permalink
Use delayed for to_zarr to allow schedualer parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp committed Jun 24, 2024
1 parent 3f3ba49 commit 89ce9c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pytools/utils/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def bin_shrink(img, shrink_dim=None):
return img.astype(input_type)


def build_pyramid(zarr_path, components: List[str], chunks=None, shrink=[-1, -2], overwrite=False):
def build_pyramid(zarr_path, components: List[str], chunks=None, shrink=(-1, -2), overwrite=False):
"""
Iteratively generate multiple resolutions of zarr arrays.
Expand All @@ -60,8 +60,9 @@ def build_pyramid(zarr_path, components: List[str], chunks=None, shrink=[-1, -2]
compressor=arr.compressor,
dimension_separator=arr._dimension_separator,
filters=arr.filters,
compute=False,
overwrite=overwrite,
# dtype=arr.dtype.newbyteorder("="),
)
).compute()

source_image = da.from_zarr(zarr_path, component=output_component)

0 comments on commit 89ce9c0

Please sign in to comment.