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

NumPy 2.0 compatibility #359

Closed
swryan opened this issue Oct 16, 2023 · 0 comments · Fixed by #362
Closed

NumPy 2.0 compatibility #359

swryan opened this issue Oct 16, 2023 · 0 comments · Fixed by #362

Comments

@swryan
Copy link
Contributor

swryan commented Oct 16, 2023

This is more or less a heads-up about the upcoming NumPy 2.0 release: numpy/numpy#24300

A quick look test shows at least one incompatibility:

  File "/mdao/u/swryan/.conda/envs/openmdao_20231016-120012/lib/python3.11/site-packages/pyoptsparse/__init__.py", line 3, in <module>
    from .pyOpt_history import History
  File "/mdao/u/swryan/.conda/envs/openmdao_20231016-120012/lib/python3.11/site-packages/pyoptsparse/pyOpt_history.py", line 12, in <module>
    from .pyOpt_utils import EPS
  File "/mdao/u/swryan/.conda/envs/openmdao_20231016-120012/lib/python3.11/site-packages/pyoptsparse/pyOpt_utils.py", line 23, in <module>
    from .types import ArrayType
  File "/mdao/u/swryan/.conda/envs/openmdao_20231016-120012/lib/python3.11/site-packages/pyoptsparse/types.py", line 9, in <module>
    NumpyType = Union[float, npt.NDArray[np.float_]]
                                         ^^^^^^^^^
  File "/mdao/u/swryan/.conda/envs/openmdao_20231016-120012/lib/python3.11/site-packages/numpy/__init__.py", line 388, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.
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.

1 participant