[MAINT]: Update dependencies #347

Merged
synchon merged 6 commits from chore/update-deps into main 2024-06-18 14:53:15 +00:00
3 changed files with 22 additions and 21 deletions

View file

@ -0,0 +1 @@
Update core and docs dependencies by `Synchon Mandal`_

View file

@ -10,9 +10,9 @@ from nilearn import image, masking
from nilearn._utils.class_inspect import get_params from nilearn._utils.class_inspect import get_params
from nilearn._utils.niimg import img_data_dtype from nilearn._utils.niimg import img_data_dtype
from nilearn._utils.niimg_conversions import ( from nilearn._utils.niimg_conversions import (
_safe_get_data,
check_niimg_3d, check_niimg_3d,
check_niimg_4d, check_niimg_4d,
safe_get_data,
) )
from nilearn.maskers import NiftiSpheresMasker from nilearn.maskers import NiftiSpheresMasker
from nilearn.maskers.base_masker import _filter_and_extract from nilearn.maskers.base_masker import _filter_and_extract
@ -104,7 +104,7 @@ def _apply_mask_and_get_affinity(
# Compute world coordinates of all in-mask voxels. # Compute world coordinates of all in-mask voxels.
if niimg is None: if niimg is None:
mask, affine = masking._load_mask_img(mask_img) mask, affine = masking.load_mask_img(mask_img)
# Get coordinate for all voxels inside of mask # Get coordinate for all voxels inside of mask
mask_coords = np.asarray(np.nonzero(mask)).T.tolist() mask_coords = np.asarray(np.nonzero(mask)).T.tolist()
X = None X = None
@ -118,21 +118,21 @@ def _apply_mask_and_get_affinity(
target_shape=niimg.shape[:3], target_shape=niimg.shape[:3],
interpolation="nearest", interpolation="nearest",
fraimondo commented 2024-06-18 14:48:50 +00:00 (Migrated from github.com)

so thanks to this we stop supporting nilearn 0.9?

so thanks to this we stop supporting nilearn 0.9?
synchon commented 2024-06-18 14:51:01 +00:00 (Migrated from github.com)

Yeah till 0.12 because of this and a few others.

Yeah till 0.12 because of this and a few others.
) )
mask, _ = masking._load_mask_img(mask_img) mask, _ = masking.load_mask_img(mask_img)
mask_coords = list(zip(*np.where(mask != 0))) mask_coords = list(zip(*np.where(mask != 0)))
X = masking._apply_mask_fmri(niimg, mask_img) X = masking.apply_mask_fmri(niimg, mask_img)
elif niimg is not None: elif niimg is not None:
affine = niimg.affine affine = niimg.affine
if np.isnan(np.sum(_safe_get_data(niimg))): if np.isnan(np.sum(safe_get_data(niimg))):
warn_with_log( warn_with_log(
"The imgs you have fed into fit_transform() contains NaN " "The imgs you have fed into fit_transform() contains NaN "
"values which will be converted to zeroes." "values which will be converted to zeroes."
) )
X = _safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T X = safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T
else: else:
X = _safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T X = safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T
mask_coords = list(np.ndindex(niimg.shape[:3])) mask_coords = list(np.ndindex(niimg.shape[:3]))

View file

@ -37,13 +37,13 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"click>=8.1.3,<8.2", "click>=8.1.3,<8.2",
"numpy>=1.24,<1.27", "numpy>=1.24.0,<2.0.0",
"scipy>=1.9.0,<=1.11.4", "scipy>=1.10.0,<=1.14.0",
"datalad>=0.15.4,<0.20", "datalad>=1.0.0,<1.2.0",
"pandas>=1.4.0,<2.2", "pandas>=2.0.0,<2.3.0",
"nibabel>=3.2.0,<5.11", "nibabel>=5.2.0,<5.3.0",
"nilearn>=0.9.0,<=0.10.2", "nilearn>=0.10.3,<=0.10.4",
"sqlalchemy>=1.4.27,<=2.1.0", "sqlalchemy>=2.0.25,<=2.1.0",
"ruamel.yaml>=0.17,<0.18", "ruamel.yaml>=0.17,<0.18",
"h5py>=3.10", "h5py>=3.10",
"httpx[http2]==0.26.0", "httpx[http2]==0.26.0",
@ -76,14 +76,14 @@ onthefly = [
neurokit2 = ["neurokit2>=0.1.7"] neurokit2 = ["neurokit2>=0.1.7"]
dev = ["tox", "pre-commit"] dev = ["tox", "pre-commit"]
docs = [ docs = [
"seaborn>=0.11.2,<0.13", "seaborn>=0.13.0,<0.14.0",
"sphinx>=5.3.0,<7.3", "sphinx>=7.3.0,<7.4.0",
"sphinx-gallery>=0.11.0,<0.15.0", "sphinx-gallery>=0.15.0,<0.17.0",
"furo>=2022.9.29,<2023.10.0", "furo>=2024.4.27,<2024.6.0",
"numpydoc>=1.5.0,<1.6", "numpydoc>=1.6.0,<1.8.0",
"julearn>=0.3.0,<0.4", "julearn==0.3.3",
"sphinx-copybutton>=0.5.1,<0.5.3", "sphinx-copybutton>=0.5.1,<0.5.3",
"towncrier>=22.12.0,<23.7", "towncrier>=23.10.0,<23.12.0",
"sphinxcontrib-mermaid>=0.8.1,<0.10", "sphinxcontrib-mermaid>=0.8.1,<0.10",
] ]