10deec4a91a42323a0b0d94238b40982d82f32e7,tests/test_core.py,,test_limit_weights,#,308

Before Change


    assert actual["d"] == 0.1
    assert actual["e"] == 0.3

    w = pd.Series({"a": 0.3, "b": 0.1,
                   "c": 0.05, "d": 0.05, "e": 0.5})

    actual = ffn.core.limit_weights(w, 0.3)

    assert actual.sum() == 1.0

After Change


    actual = ffn.core.limit_weights(w, 0.3)

    assert actual.sum() == 1.0
    for k in actual_exp:
        assert actual[k] == actual_exp[k]

    w = pd.Series(w)
    actual = ffn.core.limit_weights(w, 0.3)

    assert actual.sum() == 1.0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pmorissette/ffn
Commit Name: 10deec4a91a42323a0b0d94238b40982d82f32e7
Time: 2018-01-08
Author: pratapgr8@gmail.com
File Name: tests/test_core.py
Class Name:
Method Name: test_limit_weights


Project Name: gboeing/osmnx
Commit Name: dfe8d88a87a4b98f831f69012e22f8b7611f7d25
Time: 2020-05-13
Author: boeing@usc.edu
File Name: osmnx/simplify.py
Class Name:
Method Name: consolidate_intersections_rebuild_graph


Project Name: commonsense/conceptnet5
Commit Name: 2999e509688a82f8be65600727a5922b5739822b
Time: 2017-03-08
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/evaluation/wordsim.py
Class Name:
Method Name: compute_semeval_score