module 'numpy' has no attribute 'bool' #380
Unanswered
lililii124
asked this question in
Q&A
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. |
1 reply
|
Could you uninstall pysph first, |
1 reply
|
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. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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.boolwas a deprecated alias for the builtinbool. To avoid this error in existing code, useboolby 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
All reactions