From 1cc8be7562553f93a7cf033a401e17e37ae5a680 Mon Sep 17 00:00:00 2001 From: James Kent Date: Wed, 10 Jan 2024 17:03:43 -0600 Subject: [PATCH 1/3] bump min numpy/seaborn versions --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 83279717a..8ce0c6dce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,7 +46,7 @@ install_requires = nibabel>=3.2.0 # I/O of niftis nilearn>=0.10.1 numba>=0.57.0 # used by sparse - numpy>=1.22 # numba needs NumPy 1.22 or greater + numpy>=1.24.1 # numba needs NumPy 1.22 or greater pandas>=2.0.0 patsy # for cbmr plotly # nimare.reports @@ -55,7 +55,7 @@ install_requires = requests # nimare.extract scikit-learn>=1.0.0 # nimare.annotate and nimare.decode scipy>=1.6.0 - seaborn # nimare.reports + seaborn>=0.13.0 # nimare.reports sparse>=0.13.0 # for kernel transformers statsmodels!=0.13.2 # this version doesn't install properly tqdm # progress bars throughout package From 94684ecfac5bdaaa9a83f94494e82d2cc2a4e9b7 Mon Sep 17 00:00:00 2001 From: James Kent Date: Wed, 10 Jan 2024 17:46:25 -0600 Subject: [PATCH 2/3] rollback numpy dependencies and change how dtype is cast --- nimare/meta/utils.py | 2 +- setup.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nimare/meta/utils.py b/nimare/meta/utils.py index 736628da9..f091459eb 100755 --- a/nimare/meta/utils.py +++ b/nimare/meta/utils.py @@ -123,7 +123,7 @@ def compute_kda_ma( n_dim = ijks.shape[1] xx, yy, zz = [slice(-r // vox_dims[i], r // vox_dims[i] + 0.01, 1) for i in range(n_dim)] cube = np.vstack( - [row.ravel() for row in np.mgrid[xx, yy, zz]], dtype=np.int32, casting="unsafe" + [row.ravel() for row in (np.mgrid[xx, yy, zz]).astype(np.int32)] ) kernel = cube[:, np.sum(np.dot(np.diag(vox_dims), cube) ** 2, 0) ** 0.5 <= r] diff --git a/setup.cfg b/setup.cfg index 8ce0c6dce..1b0c1f95b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,7 +46,7 @@ install_requires = nibabel>=3.2.0 # I/O of niftis nilearn>=0.10.1 numba>=0.57.0 # used by sparse - numpy>=1.24.1 # numba needs NumPy 1.22 or greater + numpy>=1.22 # numba needs NumPy 1.22 or greater pandas>=2.0.0 patsy # for cbmr plotly # nimare.reports @@ -92,7 +92,7 @@ minimum = matplotlib==3.5.2 nibabel==4.0.0 nilearn==0.10.1 - numpy==1.24.1 + numpy==1.22 pandas==2.0.0 pymare==0.0.4rc2 scikit-learn==1.0.0 From 451b80540a08f37fc5e438ff5b61b0bd9bf6a5ce Mon Sep 17 00:00:00 2001 From: James Kent Date: Wed, 10 Jan 2024 17:57:50 -0600 Subject: [PATCH 3/3] run black --- nimare/meta/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nimare/meta/utils.py b/nimare/meta/utils.py index f091459eb..d445277ec 100755 --- a/nimare/meta/utils.py +++ b/nimare/meta/utils.py @@ -122,9 +122,7 @@ def compute_kda_ma( n_dim = ijks.shape[1] xx, yy, zz = [slice(-r // vox_dims[i], r // vox_dims[i] + 0.01, 1) for i in range(n_dim)] - cube = np.vstack( - [row.ravel() for row in (np.mgrid[xx, yy, zz]).astype(np.int32)] - ) + cube = np.vstack([row.ravel() for row in (np.mgrid[xx, yy, zz]).astype(np.int32)]) kernel = cube[:, np.sum(np.dot(np.diag(vox_dims), cube) ** 2, 0) ** 0.5 <= r] if sum_across_studies: