Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 627d7cf

Browse files
committed
FIX: Add dtypes to nilearn interface/tests
1 parent f20035c commit 627d7cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎nipype/interfaces/nilearn.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _process_inputs(self):
155155
if self.inputs.include_global:
156156
global_label_data = label_data.dataobj.sum(axis=3) # sum across all regions
157157
global_label_data = (
158-
np.rint(global_label_data).astype(int).clip(0, 1)
158+
np.rint(global_label_data).clip(0, 1).astype('u1')
159159
) # binarize
160160
global_label_data = self._4d(global_label_data, label_data.affine)
161161
global_masker = nl.NiftiLabelsMasker(

‎nipype/interfaces/tests/test_nilearn.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ def assert_expected_output(self, labels, wanted):
184184
[[2, -2, -1, -2, -5], [3, 0, 3, -5, -2]],
185185
[[-4, -2, -2, 1, -2], [3, 1, 4, -3, -2]],
186186
],
187-
]
187+
], np.int16
188188
)
189189

190-
fake_label_data = np.array([[[1, 0], [3, 1]], [[2, 0], [1, 3]]])
190+
fake_label_data = np.array([[[1, 0], [3, 1]], [[2, 0], [1, 3]]], np.uint8)
191191

192192
fake_equiv_4d_label_data = np.array(
193193
[

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /