Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: np.NaN was removed in the NumPy 2.0 release. Use np.nan instead. #82

Open
kavandeloo97 opened this issue Feb 12, 2025 · 1 comment

Comments

@kavandeloo97
Copy link

Getting this error when trying to use visualqc_freesurfer -h:

(base) admin@Katies-iMac scripts % visualqc_freesurfer -h
Traceback (most recent call last):
File "/Users/admin/miniconda3/bin/visualqc_freesurfer", line 5, in
from visualqc.freesurfer import main
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/init.py", line 24, in
from visualqc.readers import (gather_freesurfer_data, read_aparc_stats_in_hemi,
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/readers.py", line 10, in
from visualqc import config as cfg
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/config.py", line 180, in
line_break = [np.NaN, np.NaN]
^^^^^^
File "/Users/admin/miniconda3/lib/python3.11/site-packages/numpy/init.py", line 400, in getattr
raise AttributeError(
AttributeError: np.NaN was removed in the NumPy 2.0 release. Use np.nan instead.
(base) admin@Katies-iMac scripts % vqcfs -h
Traceback (most recent call last):
File "/Users/admin/miniconda3/bin/vqcfs", line 5, in
from visualqc.freesurfer import main
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/init.py", line 24, in
from visualqc.readers import (gather_freesurfer_data, read_aparc_stats_in_hemi,
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/readers.py", line 10, in
from visualqc import config as cfg
File "/Users/admin/miniconda3/lib/python3.11/site-packages/visualqc/config.py", line 180, in
line_break = [np.NaN, np.NaN]
^^^^^^
File "/Users/admin/miniconda3/lib/python3.11/site-packages/numpy/init.py", line 400, in getattr
raise AttributeError(
AttributeError: np.NaN was removed in the NumPy 2.0 release. Use np.nan instead.

@raamana
Copy link
Owner

raamana commented Feb 23, 2025

Thanks @kavandeloo97 for reporting the issue - I will take a look and try to fix it asap. if you need it in the meanwhile, just downgrade your numpy version for now e.g., use one version earlier with pip install numpy==1.26.4 and try rerun visualqc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants