dd7c34ea3480f2ffd8843171676aaa22b1777bd8,nilearn/decomposition/tests/test_canica.py,,test_canica_square_img,#,8

Before Change



    for i in range(4):
        map = np.abs(maps[i]) > np.abs(maps[i]).max() * 0.95
        for j in indices:
            ref_map = components[j].ravel() != 0
            if np.all(map.ravel() == ref_map):
                indices.remove(j)
                break
        else:
            assert False, "Non matching component"

if __name__ == "__main__":
    test_canica_square_img()

After Change


    // should all be close to 0 1 or -1
    K_abs = np.abs(K)
    assert_true(np.sum(K_abs > .9) == 4)
    K_abs[K_abs > .9] -= 1
    assert_array_almost_equal(K_abs, 0, 1)

if __name__ == "__main__":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: nilearn/nilearn
Commit Name: dd7c34ea3480f2ffd8843171676aaa22b1777bd8
Time: 2014-05-28
Author: bertrand.thirion@inria.fr
File Name: nilearn/decomposition/tests/test_canica.py
Class Name:
Method Name: test_canica_square_img


Project Name: pyinstaller/pyinstaller
Commit Name: 336638affd7687ffa272ea75a4a6f838dc9c598a
Time: 2015-10-25
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/depend/utils.py
Class Name:
Method Name: _resolveCtypesImports


Project Name: has2k1/plotnine
Commit Name: 50465ba61a0102c10137df749dac676a021949b7
Time: 2018-09-26
Author: has2k1@gmail.com
File Name: plotnine/geoms/geom_abline.py
Class Name: geom_abline
Method Name: __init__


Project Name: dit/dit
Commit Name: d68d2f5d0cc7a5520081ef2eb67db816c2bf9550
Time: 2013-10-06
Author: chebee7i@gmail.com
File Name: dit/npdist.py
Class Name: Distribution
Method Name: has_outcome