Skip to content

Commit ca52062

Browse files
committed
Provide int array to find_objects
1 parent fc76334 commit ca52062

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

intro/scipy/scipy_examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ plt.subplots_adjust(wspace=0.05, left=0.01, bottom=0.01, right=0.99, top=0.9);
110110

111111
```{code-cell}
112112
# Extract the 4th connected component, and crop the array around it
113-
sl = sp.ndimage.find_objects(labels == 4)
113+
sl = sp.ndimage.find_objects((labels == 4).astype(int))
114114
plt.figure(figsize=(3.5, 3.5))
115115
plt.imshow(sig[sl[0]])
116116
plt.title("Cropped connected component")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Requirements for notebooks / Binderhub
22
numpy==2.4.1
3-
scipy==1.15.2
3+
scipy==1.17.0
44
matplotlib==3.10.8
55
pandas==3.0
66
scikit-learn==1.8.0

0 commit comments

Comments
 (0)