7f5ffac4a2d292e215142c56fe97dcf53be560d6,cnvlib/smoothing.py,,rolling_median,#Any#Any#,34

Before Change


    
    x, wing = check_inputs(x, width)
    // Pre-allocate the result array
    result = np.empty_like(x)
    // Keep a copy of the rolling window in original order; initially fill with
    // a mirrored copy of the first "wing" points
    window = deque(np.concatenate((x[wing::-1], x[:wing])))
    // Also keep a sorted copy of the rolling window values

After Change


    x, wing = check_inputs(x, width)
    // Pad the edges of the original array with mirror copies
    signal = np.concatenate((x[wing-1::-1], x, x[:-wing-1:-1]))
    rolled = pd.rolling_median(signal, 2 * wing + 1, center=True)
    return rolled[wing:-wing]


def rolling_quantile(x, width, quantile):
    Rolling quantile (0--1) with mirrored edges.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: etal/cnvkit
Commit Name: 7f5ffac4a2d292e215142c56fe97dcf53be560d6
Time: 2016-01-06
Author: eric.talevich@gmail.com
File Name: cnvlib/smoothing.py
Class Name:
Method Name: rolling_median


Project Name: scikit-image/scikit-image
Commit Name: b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6
Time: 2020-05-04
Author: rfezzani@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: rgba2rgb


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/eig.py
Class Name:
Method Name: batch_symeig


Project Name: scipy/scipy
Commit Name: 0f77cdc2e0ff8d04d7786618857954e714b9b27b
Time: 2018-06-30
Author: adibhar97@gmail.com
File Name: scipy/spatial/transform/rotation.py
Class Name:
Method Name: _compose_quat


Project Name: scipy/scipy
Commit Name: 8bc35a85e8d495d337314409f033359cb59f87b5
Time: 2020-07-19
Author: 7954988+fetorres@users.noreply.github.com
File Name: scipy/integrate/_bvp.py
Class Name:
Method Name: stacked_matmul