Hi there, I got a problem while executing the module compute_epi_mask from nilearn.masking.
Whenever I issue:
mask = compute_epi_mask(maskPath)
maskPath is the string of path to my Nifti image to be extracted.
And I got the following message:
File "/home/jsl/Documents/untitled2.py", line 17, in mask = compute_epi_mask(epi_img = maskPath, ensure_finite = True) File "/usr/lib/python3.7/site-packages/nilearn/masking.py", line 264, in compute_epi_mask smooth=(1 if opening else False)) File "/usr/lib/python3.7/site-packages/sklearn/externals/joblib/memory.py", line 342, in _call_ return self.func(*args, **kwargs) File "/usr/lib/python3.7/site-packages/nilearn/image/image.py", line 408, in _compute_mean mean_data[nan_mask] = np.nan ValueError: cannot convert float NaN to integer`
Is this my bad on syntax usage?
Sorry, since I’m new to Python, so I could’ve make some very basic mistakes.
I’m currently on Manjaro Linux 18.0.3, using Spyder 3 as IDE, where those dependencies are installed via python-pip in Manjaro official repository.
P.S: Sorry but I can’t offer my Nifti file due to some privacy issues, but there shouldn’t be any NaN issues once I add ensure_Finite parameter.