meshpro / meshplex

:spider_web: Compute interesting points, areas, and volumes in simplex meshes of any dimension.
104 stars 22 forks source link

[BUG] Cannot import name 'NDArray' #169

Closed oldninja closed 2 years ago

oldninja commented 2 years ago

Describe the bug Exception error during import. Pygmsh and meshio worked fine without any issues.

Exception has occurred: ImportError
cannot import name 'NDArray' from 'numpy.typing' (/home/user/.local/lib/python3.9/site-packages/numpy/typing/__init__.py)
  File "/home/user/testing_meshes.py", line 3, in <module>
    import meshplex

To Reproduce

import math
import pygmsh
import meshplex

Diagnose I may ask you to cut and paste the output of the following command.

pip freeze | grep meshplex
meshplex==0.16.7

Did I help?

If I was able to resolve your problem, consider sponsoring my work on meshplex, or buy me a coffee to say thanks.

nschloe commented 2 years ago

Looks like you have an old numpy version installed.

oldninja commented 2 years ago

Updated and now it is working. Thank you @nschloe !