Skip to content

Commit 34adcf6

Browse files
committed
Update zarr imports
1 parent 000d791 commit 34adcf6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/hipct_reg/data.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
import numpy as np
1212
import numpy.typing as npt
1313
import SimpleITK as sitk
14-
import zarr.convenience
15-
import zarr.core
14+
import zarr
1615
from hoa_tools.dataset import Dataset, get_dataset
1716
from hoa_tools.inventory import load_inventory
1817

@@ -138,9 +137,9 @@ def download_cube(self) -> None:
138137
self.lower_idx[2] : self.upper_idx[2],
139138
]
140139

141-
zarr.convenience.save(self.local_zarr_path, data)
140+
zarr.save(self.local_zarr_path, data)
142141

143-
def get_remote_arr(self) -> zarr.core.Array:
142+
def get_remote_arr(self) -> zarr.Array:
144143
"""
145144
Get remote GCS store for the cube.
146145
"""

src/hipct_reg/tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pooch
44
import pytest
55
import SimpleITK as sitk
6-
import zarr.convenience
6+
import zarr
77

88
DOI = "doi:10.5281/zenodo.10778257"
99

@@ -16,7 +16,7 @@ def overview_image() -> sitk.Image:
1616
known_hash=None,
1717
processor=pooch.Unzip(),
1818
)
19-
arr = zarr.convenience.load(Path(file_paths[0]).parent)[:]
19+
arr = zarr.load(Path(file_paths[0]).parent)[:]
2020

2121
spacing = 25.08
2222
image = sitk.GetImageFromArray(arr.T)
@@ -34,7 +34,7 @@ def zoom_image() -> sitk.Image:
3434
known_hash=None,
3535
processor=pooch.Unzip(),
3636
)
37-
arr = zarr.convenience.load(Path(file_paths[0]).parent)[:]
37+
arr = zarr.load(Path(file_paths[0]).parent)[:]
3838

3939
spacing = 6.05
4040
image = sitk.GetImageFromArray(arr.T)

0 commit comments

Comments
 (0)