dbeab7509cfec1314b6529d57fbd090ce744695c,trackpy/motion.py,,compute_drift,#Any#Any#Any#,237

Before Change


    del delta["frame"]
    delta.reset_index("particle", drop=True, inplace=True)
    delta.reset_index("frame", drop=False, inplace=True)
    dx = delta.groupby("frame").mean()
    if smoothing > 0:
        dx = pd.rolling_mean(dx, smoothing, min_periods=0)
    x = dx.cumsum(0)[pos_columns]
    return x

After Change


    f_diff = f_sort[list(pos_columns) + ["particle", "frame"]].diff()

    // Rename the frame column and insert the original frame column back in.
    f_diff.rename(columns={"frame": "frame_diff"}, inplace=True)
    f_diff["frame"] = f_sort["frame"]

    // Compute the per frame averages. Keep only deltas of the same particle,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: soft-matter/trackpy
Commit Name: dbeab7509cfec1314b6529d57fbd090ce744695c
Time: 2017-07-27
Author: caspervdw@gmail.com
File Name: trackpy/motion.py
Class Name:
Method Name: compute_drift


Project Name: etal/cnvkit
Commit Name: 1fe319ef49168c2c7c8d10a7c426c1414521d164
Time: 2016-10-28
Author: eric.talevich@gmail.com
File Name: cnvlib/tabio/genepred.py
Class Name:
Method Name: read_refflat


Project Name: has2k1/plotnine
Commit Name: 3c23a55f84ab81bf825f266bab38b5bd6cbd09b1
Time: 2018-07-31
Author: has2k1@gmail.com
File Name: plotnine/facets/facet_wrap.py
Class Name: facet_wrap
Method Name: compute_layout