8000 Use np.float64 for numpy 2.0 compatibility by armallen · Pull Request #11 · swift-nav/pygnss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use np.float64 for numpy 2.0 compatibility #11

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

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

armallen
Copy link
Contributor
@armallen armallen commented Jun 27, 2024

np.float_ was removed from numpy >= 2.0.

When using it, we get:

  File "/Users/mallen/workspace/condor/.venv/lib/python3.10/site-packages/gnss/coord_system.py", line 13, in <module>
    npt.NDArray[np.float_], npt.NDArray[np.float_], npt.NDArray[np.float_]
  File "/Users/mallen/workspace/condor/.venv/lib/python3.10/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'?

This PR replaces it with the recommended np.float64

Copy link

@armallen armallen requested review from jtec and ljbade July 1, 2024 08:17
@armallen armallen merged commit 292336a into master Jul 1, 2024
2 checks passed
@armallen armallen deleted the armallen/remove-deprecated-numpy branch July 1, 2024 09:43
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 this pull request may close these issues.

2 participants
0