AttributeError: 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;
Hello and welcome to the forum! Could you please paste the entire traceback (the many lines of error messages)? This will help us see where the error occurred exactly. I don’t think you’re doing anything wrong, it’s something that needs fixing on our side.
Thank you for your welcome message and help, Richard
Below is the full error
5 # note that this is the same as:
6 # ``mne.transforms.invert_transform(
7 # mne.transforms.combine_transforms(head_mri_t, mri_mni_t))``
9 view_kwargs = dict(azimuth=105, elevation=100, focalpoint=(0, 0, -15))
---> 10 brain = mne.viz.Brain(
11 "fsaverage",
12 subjects_dir=subjects_dir,
13 cortex="low_contrast",
14 alpha=0.25,
15 background="white",
16 )
17 brain.add_sensors(epochs.info, trans=trans)
18 brain.add_head(alpha=0.25, color="tan")
File ~/anaconda3/envs/mne/lib/python3.11/site-packages/mne/viz/_brain/_brain.py:435, in Brain.__init__(***failed resolving arguments***)
428 if self._layered_meshes.get(h) is None:
429 mesh = _LayeredMesh(
430 renderer=self._renderer,
431 vertices=self.geo[h].coords,
432 triangles=self.geo[h].faces,
433 normals=self.geo[h].nn,
434 )
--> 435 mesh.map() # send to GPU
...
**AttributeError**: 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:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations```