module 'numpy' has no attribute 'bool' #380
Replies: 3 comments 2 replies
-
Sorry about this, the issue should have been fixed in the latest PySPH that is on github. You could install that using: At some point we need to update the version on pypi. |
Beta Was this translation helpful? Give feedback.
-
Could you uninstall pysph first, |
Beta Was this translation helpful? Give feedback.
-
I think this error is from compyle and it could be due to this: pypr/compyle#97 Could you try installing compyle from Github instead of PyPI with: This should solve the issue. If its still unresolved, please try reinstalling PySPH and compyle from Github after uninstalling them. |
Beta Was this translation helpful? Give feedback.
-
On my Linux virtual machine, I used conda to create a virtual environment of pyhton3.9, and quickly installed pysph through pip install pysph, but when I ran the example, the following error was prompted:
np.dtype(np.bool): 'char',
File "D:\anaconda3\envs\python39\lib\site-packages\numpy_init_.py", line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool
was a deprecated alias for the builtinbool
. To avoid this error in existing code, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.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
what should i do please
Beta Was this translation helpful? Give feedback.
All reactions