Skip to content

Commit 37cf605

Browse files
committed
[TEST] Removes nibabel DeprecationWarning
1 parent d7c4237 commit 37cf605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netneurotools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def get_centroids(img, labels=None, image_space=False):
238238
from nilearn._utils import check_niimg_3d
239239

240240
img = check_niimg_3d(img)
241-
data = img.get_data()
241+
data = np.asarray(img.dataobj)
242242

243243
if labels is None:
244244
labels = np.trim_zeros(np.unique(data))

0 commit comments

Comments
 (0)