>>> import glumpy
/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/gloo/variable.py:82: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
gl.GL_BOOL : ( 1, gl.GL_BOOL, np.bool),
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/__init__.py", line 7, in <module>
from . import app
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/app/__init__.py", line 23, in <module>
from . console import Console
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/app/console.py", line 7, in <module>
from glumpy import gl, glm, gloo
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/gloo/__init__.py", line 7, in <module>
from . program import Program
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/gloo/program.py", line 16, in <module>
from . variable import gl_typeinfo, Uniform, Attribute
File "/home/mona/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy/gloo/variable.py", line 82, in <module>
gl.GL_BOOL : ( 1, gl.GL_BOOL, np.bool),
File "/home/mona/.local/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
raise AttributeError(__former_attrs__[attr])
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. Did you mean: 'bool_'?
I changed the following file line (clean-pvnet) mona@ada:~/anaconda3/envs/clean-pvnet/lib/python3.10/site-packages/glumpy$ vi gloo/variable.py
bool gl.GL_BOOL 1 gl.GL_BOOL np.bool
to
bool gl.GL_BOOL 1 gl.GL_BOOL np.bool_
and still same error.
It seems the module is not being reloaded despite opening a new terminal tab and conda activate clean-pvnet
.
I only converted one of the
np.bool
s tonp.bool_
following a tutorial. I searched for all of them and converted them similarly and error is gone.