286ccc5463982dbed79d1cc384d9b411f93c825b,seglearn/util.py,,interp_sort,#Any#Any#,176

Before Change


    
    ind = np.argsort(t)
    t = t[ind]
    gt = t > t[0]  // prevents nan bring returned when there are duplicate values of min(x)
    gt[0] = True
    t = t[gt]
    ind = ind[gt]
    x = np.take(x, ind, axis=0)
    return t, x

After Change


    -------

    
    if (len(t) != len(x)):
        raise ValueError("Interpolation time and value errors not equal")

    ind = np.argsort(t)
    t = t[ind]
    x = x[ind]

    t, ind = np.unique(t, return_index=True)

    if len(t) < len(x):
        warnings.warn("Interpolation time has duplicate time indices", UserWarning)
        x = x[ind]

    return t, x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: dmbee/seglearn
Commit Name: 286ccc5463982dbed79d1cc384d9b411f93c825b
Time: 2019-10-09
Author: david.mo.burns@gmail.com
File Name: seglearn/util.py
Class Name:
Method Name: interp_sort


Project Name: onnx/onnx-coreml
Commit Name: ffed6ce438fc1ebdc8054d307ffdfce4bbf2f7f1
Time: 2019-09-03
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_transformers.py
Class Name: GatherConstantRemover
Method Name: __call__


Project Name: reinforceio/tensorforce
Commit Name: 6d5623b632166e67ef7dff441df5432d06b05e8d
Time: 2016-11-20
Author: k@ifricke.com
File Name: tensorforce/replay_memories/replay_memory.py
Class Name: ReplayMemory
Method Name: sample_batch