5b3aaf2231fb4da1ad6388c8f79ddd6f07067764,scipy/optimize/_spectral.py,,_root_df_sane,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,16

Before Change



    
    _check_unknown_options(unknown_options)
    if jac is not None:
        warnings.warn("DF-SANE solver does not use a Jacobian", category=OptimizeWarning)

    nexp = 2

    if eta_strategy is None:
        // Different choice from [1], as their eta is not invariant

After Change


    
    _check_unknown_options(unknown_options)

    if line_search not in ("cheng", "cruz"):
        raise ValueError("Invalid value %r for "line_search"" % (line_search,))

    nexp = 2

    if eta_strategy is None:
        // Different choice from [1], as their eta is not invariant
        // vs. scaling of F.
        def eta_strategy(k, x, F):
            // Obtain squared 2-norm of the initial residual from the outer scope
            return f_0 / (1 + k)**2

    if fnorm is None:
        def fnorm(F):
            // Obtain squared 2-norm of the current residual from the outer scope
            return f_k**(1.0/nexp)

    def fmerit(F):
        return np.linalg.norm(F)**nexp

    nfev = [0]
    f, x_k, x_shape, f_k, F_k, is_complex = _wrap_func(func, x0, fmerit, nfev, maxfev, args)

    k = 0
    f_0 = f_k
    sigma_k = sigma_0

    F_0_norm = fnorm(F_k)

    // For the "cruz" line search
    prev_fs = collections.deque([f_k], M)

    // For the "cheng" line search
    Q = 1.0
    C = f_0

    converged = False
    message = "too many function evaluations required"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: scipy/scipy
Commit Name: 5b3aaf2231fb4da1ad6388c8f79ddd6f07067764
Time: 2015-01-19
Author: pav@iki.fi
File Name: scipy/optimize/_spectral.py
Class Name:
Method Name: _root_df_sane


Project Name: AlexsLemonade/refinebio
Commit Name: 851a4d3df459e36fb500828815cd6840860d3467
Time: 2018-06-07
Author: kurt.wheeler91@gmail.com
File Name: foreman/data_refinery_foreman/surveyor/array_express.py
Class Name: ArrayExpressSurveyor
Method Name: create_experiment_from_api


Project Name: AlexsLemonade/refinebio
Commit Name: f55c645373b2057a5c1c7861cdb6c717585cf0b7
Time: 2018-05-29
Author: kurt.wheeler91@gmail.com
File Name: foreman/data_refinery_foreman/surveyor/array_express.py
Class Name: ArrayExpressSurveyor
Method Name: create_experiment_from_api