mattloper / chumpy

MIT License
195 stars 118 forks source link

'import chumpy' fails: ImportError: cannot import name 'bool' from 'numpy' #55

Open yurivict opened 8 months ago

yurivict commented 8 months ago
>>> import chumpy
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
  from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.str` will be defined as the corresponding NumPy scalar.
  from numpy import bool, int, float, complex, object, unicode, str, nan, inf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/chumpy/__init__.py", line 11, in <module>
    from numpy import bool, int, float, complex, object, unicode, str, nan, inf
ImportError: cannot import name 'bool' from 'numpy' (/usr/local/lib/python3.9/site-packages/numpy/__init__.py)
>>>

Version: 0.70 py39-numpy-1.25.0 Python-3.9 FreeBSD 14.0

yurivict commented 8 months ago

The documentation says that numpy has bool_, not bool.

kairusann commented 8 months ago

This issue was fixed recently but not yet sync up to PyPi (as discussed in #49), you can install the fixed version with pip install git+https://github.com/mattloper/chumpy

dlazares commented 6 months ago

thanks @kairusann! when pypi fix?

nubertj commented 1 month ago

would it be possible to update the pypi? The latest version in pypi is still 0.70, while the current master has 0.71 (which makes it hard to generate reproducible config files).