Skip to content

Commit 27bb4a7

Browse files
Fix numpy 2.0 support; add numba to deps (scverse#734)
fix numpy 2.0 support; add numba to deps
1 parent 851a267 commit 27bb4a7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies = [
3030
"geopandas>=0.14",
3131
"multiscale_spatial_image>=1.0.0",
3232
"networkx",
33+
"numba",
3334
"numpy",
3435
"ome_zarr>=0.8.4",
3536
"pandas",

src/spatialdata/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _image_blobs(
183183
masks = []
184184
for i in range(n_channels):
185185
mask = self._generate_blobs(length=length, seed=i)
186-
mask = (mask - mask.min()) / mask.ptp() # type: ignore[attr-defined]
186+
mask = (mask - mask.min()) / np.ptp(mask) # type: ignore[attr-defined]
187187
masks.append(mask)
188188

189189
x = np.stack(masks, axis=0)

0 commit comments

Comments
 (0)