Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numexpr.test() not working on Mac M1, python 3.9, numpy 2.0.0.dev #465

Closed
27rabbitlt opened this issue Dec 5, 2023 · 2 comments
Closed

Comments

@27rabbitlt
Copy link
Contributor

27rabbitlt commented Dec 5, 2023

When I run numexpr.test(), the output is:

Traceback (most recent call last):
  File "/Users/liuteng/opt/anaconda3/envs/test_ne/lib/python3.9/site-packages/numexpr-2.8.8.dev1-py3.9-macosx-10.9-x86_64.egg/numexpr/__init__.py", line 64, in test
    import numexpr.tests
  File "/Users/liuteng/opt/anaconda3/envs/test_ne/lib/python3.9/site-packages/numexpr-2.8.8.dev1-py3.9-macosx-10.9-x86_64.egg/numexpr/tests/__init__.py", line 11, in <module>
    from numexpr.tests.test_numexpr import test, print_versions
  File "/Users/liuteng/opt/anaconda3/envs/test_ne/lib/python3.9/site-packages/numexpr-2.8.8.dev1-py3.9-macosx-10.9-x86_64.egg/numexpr/tests/test_numexpr.py", line 21, in <module>
    from numpy import (
ImportError: cannot import name 'complex_' from 'numpy' (/Users/liuteng/opt/anaconda3/envs/test_ne/lib/python3.9/site-packages/numpy/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/liuteng/opt/anaconda3/envs/test_ne/lib/python3.9/site-packages/numexpr-2.8.8.dev1-py3.9-macosx-10.9-x86_64.egg/numexpr/__init__.py", line 68, in test
    raise ImportError('`numexpr.tests` could not be imported, likely it was excluded from the distribution.')
ImportError: `numexpr.tests` could not be imported, likely it was excluded from the distribution.

The problem is that numpy will remove numpy.complex_ and we should better use numpy.cdouble instead.

@FrancescAlted
Copy link
Contributor

Agreed. We'll appreciate a PR in this direction.

@27rabbitlt
Copy link
Contributor Author

closed by #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants