4af750bec058da0cf5d4a3245a443549b9d7fd33,skopt/dummy_opt.py,,dummy_minimize,#,9

Before Change



    for i in range(maxiter):
        X[i] = lb + (ub - lb) * rng.rand(n_params)
        y[i] = func(X[i])

    res = OptimizeResult()
    best = np.argmin(y)
    res.x = X[best]

After Change


    if not np.isscalar(init_y):
        raise ValueError(
            "The function to be optimized should return a scalar")
    y = np.asarray([init_y] + [func(X[i]) for i in range(maxiter - 1)])

    res = OptimizeResult()
    best = np.argmin(y)
    res.x = X[best]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: 4af750bec058da0cf5d4a3245a443549b9d7fd33
Time: 2016-04-05
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/dummy_opt.py
Class Name:
Method Name: dummy_minimize


Project Name: Bihaqo/t3f
Commit Name: fb43d1f4a64b77f8b64134460b0c77cb5f79e185
Time: 2018-10-31
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: hessian_vector_product


Project Name: riga/tfdeploy
Commit Name: 374c26d2c01a7a07078e398542faae0ae55c1014
Time: 2016-03-11
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: eval


Project Name: Bihaqo/t3f
Commit Name: fb43d1f4a64b77f8b64134460b0c77cb5f79e185
Time: 2018-10-31
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: gradients