I followed the adult MRI template however, i get this error when i try to visualize the source space
- MNE version: 1.0.3
- operating system: Windows 11
The code snippet
fs_dir = fetch_fsaverage(verbose=True)
subjects_dir = op.dirname(fs_dir)
subject = “fsaverage”
trans = “fsaverage” # MNE has a built-in fsaverage transformation
src = op.join(fs_dir, “bem”, “fsaverage-ico-5-src.fif”)
bem = op.join(fs_dir, “bem”, “fsaverage-5120-5120-5120-bem-sol.fif”)
montage = mne.channels.make_standard_montage(‘standard_1020’)
infoTopo = mne.create_info(ch_names=chNames[:24], sfreq = sfreq_eeg,ch_types=“eeg”).set_montage(montage, match_case=False)
raw = mne.io.RawArray(soiFltrd[i_f][:24], infoTopo)
raw.set_eeg_reference(projection=True)
mne.viz.plot_alignment(raw.info,src=src, eeg=[“original”, “projected”],trans=trans,show_axes=True,mri_fiducials=True,dig=“fiducials”,)
The error message comes when it gets to mne.viz.plot_alignment and the error is
module ‘numpy’ has no attribute ‘bool’.
np.bool
was a deprecated alias for the builtin bool
. To avoid this error in existing code, use bool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
NumPy 1.20.0 Release Notes — NumPy v2.0.dev0 Manual
Please any help will be appreciated.
Thanks