f1e6577b856fa088ad1af728d8387d1932658ce4,scipy/optimize/tests/test__linprog_clean_inputs.py,,test__clean_inputs2,#,282

Before Change




def test__clean_inputs2():
    c = 1
    A_ub = [[1]]
    b_ub = 1
    A_eq = [[1]]
    b_eq = 1
    bounds = (0, 1)
    outputs = _clean_inputs(
        c=c,
        A_ub=A_ub,
        b_ub=b_ub,
        A_eq=A_eq,
        b_eq=b_eq,
        bounds=bounds)
    assert_allclose(outputs[0], np.array(c))
    assert_allclose(outputs[1], np.array(A_ub))
    assert_allclose(outputs[2], np.array(b_ub))
    assert_allclose(outputs[3], np.array(A_eq))

After Change




def test__clean_inputs2():
    lp = _LPProblem(
        c=1,
        A_ub=[[1]],
        b_ub=1,
        A_eq=[[1]],
        b_eq=1,
        bounds=(0, 1)
    )

    lp_cleaned = _clean_inputs(lp)

    assert_allclose(lp_cleaned.c, np.array(lp.c))
    assert_allclose(lp_cleaned.A_ub, np.array(lp.A_ub))
    assert_allclose(lp_cleaned.b_ub, np.array(lp.b_ub))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 13

Instances


Project Name: scipy/scipy
Commit Name: f1e6577b856fa088ad1af728d8387d1932658ce4
Time: 2019-08-13
Author: chelsea.liu@datadoghq.com
File Name: scipy/optimize/tests/test__linprog_clean_inputs.py
Class Name:
Method Name: test__clean_inputs2


Project Name: scipy/scipy
Commit Name: f1e6577b856fa088ad1af728d8387d1932658ce4
Time: 2019-08-13
Author: chelsea.liu@datadoghq.com
File Name: scipy/optimize/tests/test__linprog_clean_inputs.py
Class Name:
Method Name: test_aliasing


Project Name: scipy/scipy
Commit Name: 0fbce92e3ecf2dae1c4819d4c970724184d12d41
Time: 2019-10-27
Author: chelsea.liu@datadoghq.com
File Name: scipy/optimize/tests/test__linprog_clean_inputs.py
Class Name:
Method Name: test_aliasing


Project Name: scipy/scipy
Commit Name: 0fbce92e3ecf2dae1c4819d4c970724184d12d41
Time: 2019-10-27
Author: chelsea.liu@datadoghq.com
File Name: scipy/optimize/tests/test__linprog_clean_inputs.py
Class Name:
Method Name: test__clean_inputs2