-
Notifications
You must be signed in to change notification settings - Fork 4
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
Problem with new version of numpy #166
Comments
I just hit this error. I note that the current version of the file in desimodel-data (0.18.0 and trunk) has only 8 columns, so the way the code first tries to read the file will always fail, and it depends on getting an IndexError in order to do the right thing, while some versions of numpy instead raise a ValueError. So at the very least, the expected path should be the path that doesn't demand the right kind of exception being raised :) |
Minimal change would be to make line 377
|
This dates back to a very early version of the file and supporting the transition period after the "arclength" column was dropped from the file provided by the engineering team. I'm fine with either updating the code to support only the current format, or updating to |
Hi,
I'm using python3.10 with numpy = 1.24.3.
desimodel/py/desimodel/io.py
Line 377 in 3f4bf40
does not raise 'IndexError' but 'ValueError'. So, I cannot use the code, as it is.
Instead of playing with the exception, I suggest to just try the shape of this file:
if np.loadtxt(infile).shape[1] == 8:
DO
else:
DO
The text was updated successfully, but these errors were encountered: