Skip to content

Commit

Permalink
Fix numpy 2.0 support; add numba to deps (scverse#734)
Browse files Browse the repository at this point in the history
fix numpy 2.0 support; add numba to deps
  • Loading branch information
LucaMarconato authored Oct 20, 2024
1 parent 851a267 commit 27bb4a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"geopandas>=0.14",
"multiscale_spatial_image>=1.0.0",
"networkx",
"numba",
"numpy",
"ome_zarr>=0.8.4",
"pandas",
Expand Down
2 changes: 1 addition & 1 deletion src/spatialdata/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _image_blobs(
masks = []
for i in range(n_channels):
mask = self._generate_blobs(length=length, seed=i)
mask = (mask - mask.min()) / mask.ptp() # type: ignore[attr-defined]
mask = (mask - mask.min()) / np.ptp(mask) # type: ignore[attr-defined]
masks.append(mask)

x = np.stack(masks, axis=0)
Expand Down

0 comments on commit 27bb4a7

Please sign in to comment.