Skip to content

Commit

Permalink
[MAINT] Fix scipy.ndimage.measurements deprecations (#3343)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen committed Aug 24, 2022
1 parent 0ddf4af commit b6de3aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nilearn/regions/signal_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def img_to_signals_labels(imgs, labels_img, mask_img=None,
# Nilearn issue: 2135, PR: 2195 for why this is necessary.
signals = np.ndarray((data.shape[-1], len(labels)), order=order,
dtype=target_datatype)
reduction_function = getattr(ndimage.measurements, strategy)
reduction_function = getattr(ndimage, strategy)
for n, img in enumerate(np.rollaxis(data, -1)):
signals[n] = np.asarray(reduction_function(img,
labels=labels_data,
Expand Down

0 comments on commit b6de3aa

Please sign in to comment.