589c372da5e415c4c0c33171971d3b26102b8b3c,scipy/sparse/construct.py,,rand,#Any#Any#Any#Any#Any#Any#,660
Before Change
return np.unique(np.floor(ind * mn))[:k]
ind = _gen_unique_rand(random_state, gk)
while ind.size < k:
gk *= 1.05
ind = _gen_unique_rand(random_state, gk)
j = np.floor(ind * 1. / m).astype(tp)
i = (ind - j * m).astype(tp)
vals = random_state.rand(k).astype(dtype)
return coo_matrix((vals, (i, j)), shape=(m, n)).asformat(format)
After Change
for i in xrange(k):
j = random_state.randint(mn)
while j in selected:
j = random_state.randint(mn)
selected.add(j)
ind[i] = j
j = np.floor(ind * 1. / m).astype(tp)
i = (ind - j * m).astype(tp)
vals = random_state.rand(k).astype(dtype)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: markovmodel/PyEMMA
Commit Name: e74fc1410747ac93246cd4545efbc6ede95b94d2
Time: 2017-05-19
Author: m.scherer@fu-berlin.de
File Name: pyemma/coordinates/tests/test_kmeans.py
Class Name: TestKmeans
Method Name: test_3gaussian_1d_singletraj
Project Name: mathics/Mathics
Commit Name: f592ce49086098fe835de68a7ee7bf49967b14ad
Time: 2016-08-22
Author: Bernhard.Liebl@gmx.org
File Name: mathics/algorithm/clusters.py
Class Name:
Method Name: _shuffled_range