Skip to content

Commit

Permalink
Remove np, nilearn deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
emdupre committed Sep 8, 2023
1 parent 961a636 commit eb5d916
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fmralign/tests/test_piecewise.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np
from sklearn.base import clone
from nilearn.input_data import NiftiMasker
from nilearn.maskers import NiftiMasker
from fastsrm.identifiable_srm import IdentifiableFastSRM

from fmralign.piecewise import PiecewiseModel, Identity
Expand All @@ -15,7 +15,7 @@ def to_niimgs(X, dim):
p = np.prod(dim)
assert len(dim) == 3
assert X.shape[-1] <= p
mask = np.zeros(p).astype(np.bool)
mask = np.zeros(p).astype(bool)
mask[: X.shape[-1]] = 1
assert mask.sum() == X.shape[1]
mask = mask.reshape(dim)
Expand All @@ -25,7 +25,7 @@ def to_niimgs(X, dim):
affine = np.eye(4)
return (
nibabel.Nifti1Image(X, affine),
nibabel.Nifti1Image(mask.astype(np.float), affine),
nibabel.Nifti1Image(mask.astype(float), affine),
)


Expand Down

0 comments on commit eb5d916

Please sign in to comment.