Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ome_zarr/scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def gaussian(self, base: np.ndarray) -> list[np.ndarray]:
base,
downscale=self.downscale,
max_layer=self.max_layer,
multichannel=False,
channel_axis=None,
)
)

Expand All @@ -220,7 +220,7 @@ def laplacian(self, base: np.ndarray) -> list[np.ndarray]:
base,
downscale=self.downscale,
max_layer=self.max_layer,
multichannel=False,
channel_axis=None,
)
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
# See https://github.com/fsspec/filesystem_spec/issues/819
"aiohttp<4",
"requests",
"scikit-image",
"scikit-image>=0.19.0",
"toolz",
]
classifiers = [
Expand Down
26 changes: 26 additions & 0 deletions tests/test_scaler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import pathlib

import dask.array as da
import numpy as np
import pytest
import zarr

from ome_zarr.io import parse_url
from ome_zarr.scale import Scaler
from ome_zarr.writer import write_image


class TestScaler:
Expand Down Expand Up @@ -146,3 +151,24 @@ def test_big_dask_pyramid(self, tmpdir):
# to zarr invokes compute
data_dir = tmpdir.mkdir("test_big_dask_pyramid")
da.to_zarr(level_1, str(data_dir))

@pytest.mark.parametrize("method", ["gaussian", "laplacian"])
def test_pyramid_args(self, shape, tmpdir, method):
path = pathlib.Path(tmpdir.mkdir("data"))
store = parse_url(path, mode="w").store
group = zarr.group(store=store, overwrite=True)
data = self.create_data(shape)

scaler = Scaler(
downscale=2,
method=method,
max_layer=2,
)

axes = "tczyx"[-len(shape) :]
write_image(
image=data,
group=group,
scaler=scaler,
axes=axes,
)
Loading