mdsplus icon indicating copy to clipboard operation
mdsplus copied to clipboard

errors importing MDSplus with numpy 2.x

Open rcavazz opened this issue 1 year ago • 1 comments
trafficstars

with the new python version I got this error: File "/usr/local/mdsplus/python/MDSplus/version.py", line 34, in from numpy import string_ as npbytes ImportError: cannot import name 'string_' from 'numpy'

reason: string_ and unicode_ have been removed in numpy 2.x

I came up with this quick fix in version.py:

# from numpy import string_ as npbytes
from numpy import bytes_ as npbytes
# from numpy import unicode_ as npunicode
from numpy import str_ as npunicode

probably should be refactored to maintain some back compatibility.

rcavazz avatar Jul 01 '24 15:07 rcavazz

Same on my side, I also had to manually do those changes in 7.142-80.

Cheers!

alkhwarizmi avatar Jul 08 '24 12:07 alkhwarizmi