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

Avoid SciPy deprecation warning. #157

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

moorepants
Copy link
Collaborator

@moorepants moorepants commented Oct 12, 2022

=========================================== warnings summary ============================================
cyipopt/scipy_interface.py:29
  /home/moorepants/src/cyipopt/cyipopt/scipy_interface.py:29: DeprecationWarning: Please use `MemoizeJac` from the `scipy.optimize` namespace, the `scipy.optimize.optimize` namespace is deprecated.
    from scipy.optimize.optimize import MemoizeJac

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

@moorepants moorepants merged commit 63e6e33 into mechmotum:master Oct 12, 2022
@moorepants moorepants deleted the scipy-deprecation branch October 12, 2022 14:57
@daugihao daugihao mentioned this pull request Nov 24, 2022
@nrontsis
Copy link
Contributor

nrontsis commented Dec 2, 2022

This PR did not solve the issue. MemoizeJac is not exported to scipy.optimize, and as far as I understand it's not part of the public API of scipy anymore.

If we want to avoid the warning with minimal changes we can do:

~~from scipy.optimize._optimize import MemoizeJac~~

@moorepants
Copy link
Collaborator Author

I'd rather not import from a private module. You can disable the warning in your code if you don't want to see it.

We'll have to find an alternative eventually. I've opened #160.

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