8b8a963d4bd19330d06a553bd93741b147bf2668,originality.py,,originality_score,#Any#Any#,77

Before Change


    data2 = np.sort(data2)
    n1 = data1.shape[0]
    n2 = data2.shape[0]
    data_all = np.concatenate([data1, data2])
    cdf1 = np.searchsorted(data1, data_all, side="right") / (1.0*n1)
    cdf2 = np.searchsorted(data2, data_all, side="right") / (1.0*n2)
    d = np.max(np.absolute(cdf1 - cdf2))
    return d

After Change


    // the following commented out line is slower than the two after it
    // cdf2 = np.searchsorted(data2, data_all, side="right") / (1.0*n2)
    cdf2 = np.searchsorted(data2, data1, side="right")
    cdf2 = np.concatenate((cdf2, np.arange(n1) + 1)) / (1.0*n2)

    d = np.max(np.absolute(cdf1 - cdf2))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: numerai/submission-criteria
Commit Name: 8b8a963d4bd19330d06a553bd93741b147bf2668
Time: 2017-09-15
Author: phil@pcmonk.me
File Name: originality.py
Class Name:
Method Name: originality_score


Project Name: pymc-devs/pymc3
Commit Name: d6a2e55cea7640cf6ab1250bbaba66dd79a7ee85
Time: 2017-09-02
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/theanof.py
Class Name: BatchedDiag
Method Name: perform


Project Name: biocore/scikit-bio
Commit Name: a213ceca277275a0a39e3efdf6c4a1c4afdfb2ea
Time: 2014-05-05
Author: jai.rideout@gmail.com
File Name: skbio/maths/diversity/alpha/lladser.py
Class Name:
Method Name: _expand_counts


Project Name: geomstats/geomstats
Commit Name: 236c30bae48e43f7c91434b9a18d1d97579c98ae
Time: 2018-09-27
Author: ninamio78@gmail.com
File Name: geomstats/special_orthogonal_group.py
Class Name:
Method Name: get_mask_i_float