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

scipy.optimize.linesearch deprecation warning #50

Open
jrmaddison opened this issue Feb 7, 2022 · 1 comment
Open

scipy.optimize.linesearch deprecation warning #50

jrmaddison opened this issue Feb 7, 2022 · 1 comment
Assignees
Labels
dependencies issues or warnings from dependencies

Comments

@jrmaddison
Copy link
Collaborator

Use of objects in scipy.optimize.linesearch raises a deprecation warning with SciPy 1.8.0

@jrmaddison jrmaddison added the dependencies issues or warnings from dependencies label Feb 7, 2022
@jrmaddison jrmaddison self-assigned this Feb 7, 2022
@bearecinos
Copy link
Collaborator

I have a comment on this ... do we need to then just write
scipy.optimize.line_search directly in:

def line_search_rank0_scipy_scalar_search_wolfe1(
        F, Fp, c1, c2, old_F_val=None, old_Fp_val=None, **kwargs):
    from scipy.optimize.linesearch import scalar_search_wolfe1 as line_search
    alpha, phi, phi0 = line_search(
        F, Fp,
        phi0=old_F_val, derphi0=old_Fp_val, c1=c1, c2=c2,
        **kwargs)
    if alpha is None:
        phi = None
    return alpha, phi

like

def line_search_rank0_scipy_scalar_search_wolfe1(
        F, Fp, c1, c2, old_F_val=None, old_Fp_val=None, **kwargs):
    from scipy.optimize import line_search
    alpha, phi, phi0 = line_search(
        F, Fp,
        phi0=old_F_val, derphi0=old_Fp_val, c1=c1, c2=c2,
        **kwargs)
    if alpha is None:
        phi = None
    return alpha, phi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies issues or warnings from dependencies
Projects
None yet
Development

No branches or pull requests

2 participants