589c372da5e415c4c0c33171971d3b26102b8b3c,scipy/sparse/construct.py,,rand,#Any#Any#Any#Any#Any#Any#,660

Before Change


    // Generate a few more values than k so that we can get unique values
    // afterwards.
    // XXX: one could be smarter here
    mlow = 5
    fac = 1.02
    gk = min(k + mlow, fac * k)

    if random_state is None:
        random_state = np.random
    elif isinstance(random_state, (int, np.integer)):

After Change


        ind = random_state.permutation(mn)[:k]
    else:
        ind = np.empty(k, dtype=tp)
        selected = set()
        for i in xrange(k):
            j = random_state.randint(mn)
            while j in selected:
                j = random_state.randint(mn)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scipy/scipy
Commit Name: 589c372da5e415c4c0c33171971d3b26102b8b3c
Time: 2014-05-29
Author: perimosocordiae@gmail.com
File Name: scipy/sparse/construct.py
Class Name:
Method Name: rand


Project Name: deepfakes/faceswap
Commit Name: 924d53789ba0ad40158f082839482cbf9060e67c
Time: 2020-03-10
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/control_helper.py
Class Name: AutoFillContainer
Method Name: __init__


Project Name: sassoftware/python-dlpy
Commit Name: d0e35b89aefbf665b9aff2a1777c3873b2bb4669
Time: 2019-05-16
Author: Wenyu.Shi@sas.com
File Name: dlpy/layers.py
Class Name: Res
Method Name: output_size