86f4e384b066cecf50dec65c8dfa48aaddfbb17d,scipy/optimize/_minimize.py,,minimize,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,42

Before Change



    // check gradient vector
    if meth == "trust-constr":
        if type(jac) is bool:
            if jac:
                fun = MemoizeJac(fun)
                jac = fun.derivative
            else:
                jac = "2-point"
        elif jac is None:
            jac = "2-point"
        elif not callable(jac) and jac not in ("2-point", "3-point", "cs"):
            raise ValueError("Unsupported jac definition.")
    else:
        if jac in ("2-point", "3-point", "cs"):
            if jac in ("3-point", "cs"):
                warn("Only "trust-constr" method accept %s "

After Change


          meth in ["trust-constr", "bfgs", "cg", "l-bfgs-b", "tnc"]):
        // finite differences
        pass
    elif meth in ["trust-constr"]:
        // default jac calculation for this method
        jac = "2-point"
    elif jac is None or bool(jac) is False:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: scipy/scipy
Commit Name: 86f4e384b066cecf50dec65c8dfa48aaddfbb17d
Time: 2019-08-31
Author: andyfaff@gmail.com
File Name: scipy/optimize/_minimize.py
Class Name:
Method Name: minimize


Project Name: dmbee/seglearn
Commit Name: b7eb836b40893bc25e782658cfec6f7bd6c4c451
Time: 2018-03-06
Author: david.mo.burns@gmail.com
File Name: seglearn/segment.py
Class Name: Segment
Method Name: transform


Project Name: dmbee/seglearn
Commit Name: b7eb836b40893bc25e782658cfec6f7bd6c4c451
Time: 2018-03-06
Author: david.mo.burns@gmail.com
File Name: seglearn/features.py
Class Name: SegFeatures
Method Name: transform