2877abcbc7ac4be1a1d38551e2a52b143cfd63c6,scipy/stats/_binned_statistic.py,,_bin_numbers,#Any#Any#Any#Any#,680

Before Change


    // Using `digitize`, values that fall on an edge are put in the right bin.
    // For the rightmost bin, we want values equal to the right
    // edge to be counted in the last bin, and not as an outlier.
    exceptions = (RuntimeWarning,)
    if sys.version_info >= (3, 8):
        exceptions += (OverflowError,)  // Python3.8 int(np.inf) throws this
    for i in xrange(Ndim):
        // Find the rounding precision
        try:

After Change


        dedges_min = dedges[i].min()
        if dedges_min == 0:
            raise ValueError("The smallest edge difference is numerically 0.")
        decimal = int(-np.log10(dedges_min)) + 6
        // Find which points are on the rightmost edge.
        on_edge = np.where(np.around(sample[:, i], decimal) ==
                           np.around(edges[i][-1], decimal))[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: scipy/scipy
Commit Name: 2877abcbc7ac4be1a1d38551e2a52b143cfd63c6
Time: 2019-10-30
Author: egouden@users.noreply.github.com
File Name: scipy/stats/_binned_statistic.py
Class Name:
Method Name: _bin_numbers


Project Name: tensorflow/privacy
Commit Name: a4d108f270830ddacb24a7caf339898564ca9d78
Time: 2020-12-16
Author: liweisongpku@gmail.com
File Name: tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack.py
Class Name:
Method Name: _compute_privacy_risk_score


Project Name: mne-tools/mne-python
Commit Name: 017d156706984b88a524b146ec71415c65b42391
Time: 2019-05-14
Author: w.m.vanvliet@gmail.com
File Name: examples/inverse/plot_dics_source_power.py
Class Name:
Method Name: