3ba0467f450592cd04b8fc89ce3cc95229cd1891,scipy/sparse/csgraph/tests/test_reordering.py,,test_graph_maximum_bipartite_matching,#,26

Before Change


def test_graph_maximum_bipartite_matching():
    A = diags(np.ones(25), offsets=0, format="csc")
    rand_perm = np.random.permutation(25).astype("int32")
    rand_perm2 = np.random.permutation(25).astype("int32")

    Rrow = np.arange(25, dtype=np.int32)
    Rcol = rand_perm
    Rdata = np.ones(25,dtype=int)

After Change


    B.indices = B.indices.astype("int64")
    B.indptr = B.indptr.astype("int64")
    perm = maximum_bipartite_matching(B,perm_type="row")
    Rrow = np.arange(25)
    Rcol = perm
    Rdata = np.ones(25,dtype=int)
    Rmat = coo_matrix((Rdata,(Rrow,Rcol))).tocsc()
    C3 = Rmat*B
    assert_equal(any(C3.diagonal() == 0), False)
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scipy/scipy
Commit Name: 3ba0467f450592cd04b8fc89ce3cc95229cd1891
Time: 2014-07-09
Author: nonhermitian@gmail.com
File Name: scipy/sparse/csgraph/tests/test_reordering.py
Class Name:
Method Name: test_graph_maximum_bipartite_matching


Project Name: albu/albumentations
Commit Name: 165af1539626c77fd3896d3123b0242bd42aa494
Time: 2018-06-29
Author: aleksandr.buslaev@mapbox.com
File Name: albumentations/augmentations/functional.py
Class Name:
Method Name: gamma_transform


Project Name: reinforceio/tensorforce
Commit Name: ce961ed06c22bf7c1178162450a88174fb401c14
Time: 2017-11-25
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/core/preprocessing/normalize.py
Class Name: Normalize
Method Name: process