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 1.25 deprecation warnings reintroduced #368

Closed
eirikurj opened this issue Dec 5, 2023 · 0 comments · Fixed by #372
Closed

Numpy 1.25 deprecation warnings reintroduced #368

eirikurj opened this issue Dec 5, 2023 · 0 comments · Fixed by #372

Comments

@eirikurj
Copy link
Contributor

eirikurj commented Dec 5, 2023

Description

PR #364 re-introduced numpy 1.25 deprecation warnings.

Steps to reproduce issue

Using docker image mdolab/private:u22-gcc-ompi-latest-amd64 built last night (sha256:003651040c0592819d7960e9ad4a29585cfbc659c33798cb438c062b5285992e) and running

mdolabuser@39c0e494642c:~/repos/pyoptsparse/tests$ testflo --show_deprecations test_tp109.py

will generate the following

Deprecations Report
===================

1 unique deprecation warnings were captured:

--
Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

    /pyoptsparse/pyOpt_solution.py, line 54
    [test_tp109.py:TestTP109.test_autorefine]

    /pyoptsparse/pyOpt_solution.py, line 54
    [test_tp109.py:TestTP109.test_slsqp]

    /pyoptsparse/pyOpt_solution.py, line 53
    [test_tp109.py:TestTP109.test_snopt]

    /pyoptsparse/pyOpt_solution.py, line 53
    [test_tp109.py:TestTP109.test_autorefine]

    /pyoptsparse/pyOpt_solution.py, line 54
    [test_tp109.py:TestTP109.test_snopt]

    /pyoptsparse/pyOpt_solution.py, line 53
    [test_tp109.py:TestTP109.test_snopt_informs]

    /pyoptsparse/pyOpt_solution.py, line 54
    [test_tp109.py:TestTP109.test_snopt_informs]

    /pyoptsparse/pyOpt_solution.py, line 53
    [test_tp109.py:TestTP109.test_slsqp]

Current behavior

Warnings are issued

Expected behavior

No warnings should be issued

Code versions

mdolab/private:u22-gcc-ompi-latest-amd64 built last night (sha256:003651040c0592819d7960e9ad4a29585cfbc659c33798cb438c062b5285992e)

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