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

SimPEG and numpy v2 #361

Open
kkappler opened this issue Oct 12, 2024 · 2 comments
Open

SimPEG and numpy v2 #361

kkappler opened this issue Oct 12, 2024 · 2 comments
Assignees

Comments

@kkappler
Copy link
Collaborator

kkappler commented Oct 12, 2024

Tests failing on 3.10 and 3.11, OK on 3.8 and 3.9

File simplex_helpers.pyx:1, in init discretize._extensions.simplex_helpers()

ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).

More info:

File "/usr/share/miniconda/envs/aurora-test/lib/python3.10/site-packages/discretize/unstructured_mesh.py", line 7, in <module>
    from discretize._extensions.simplex_helpers import (

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

image

@kkappler
Copy link
Collaborator Author

Seems to be this line:
from mtpy.processing import RunSummary, KernelDataset

@kujaku11 is it possible to allow aurora to import these without needing discretize and deeper simpeg stuffs? When I look at the imports in mtpy.processing I don't see and deeper reference to simpeg, but the github error calls out discretize

In a pinch I can migrate these modules to aurora for the workshop.

@kujaku11
Copy link
Collaborator

I guess in the next release we can make simpeg an optional install. https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies.

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