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

AttributeError: module 'numpy' has no attribute 'float128' in coord.py #698

Closed
pbrotoisworo opened this issue Nov 17, 2021 · 1 comment · Fixed by #699
Closed

AttributeError: module 'numpy' has no attribute 'float128' in coord.py #698

pbrotoisworo opened this issue Nov 17, 2021 · 1 comment · Fixed by #699

Comments

@pbrotoisworo
Copy link
Contributor

I just updated my MintPy and now I have this error where NumPy has no attribute float128.
It comes from this line:

if isinstance(coord_in, (float, np.float16, np.float32, np.float64, np.float128)):

I looked into it and it seems that float128 is not supported on Windows OS. I removed np.float128 from the line and my analysis works with no error.

See related Github issue from other repo for reference: winpython/winpython#613

If precision is still required up to float128 then here is a possible solution: quantumlib/Cirq#1511 (comment)

@yunjunz
Copy link
Member

yunjunz commented Nov 17, 2021

Thank you @pbrotoisworo for the bug report and proposed fix. np.float128 is not really used anywhere in the mintpy code, so there is no issue with removing it. But I prefer the replacement to np.longdouble solution, to remind us of this issue and for future reference. Could you issue a PR for your fix?

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

Successfully merging a pull request may close this issue.

2 participants