6704c535b8c59ab3b9b98c0489a051654c1ee727,nisl/signals.py,,_standardize,#Any#Any#Any#,12

Before Change


    =======
    std_signals: copy of signals, normalized.
    
    signals = np.array(signals).astype(np.float)
    buf = signals.T
    buf -= signals.mean(axis=-1)

    if normalize:

After Change


    if normalize:
        // remove mean if not already detrended
        if not detrend:
            signals -= signals.mean(axis=0)

        std = np.sqrt((signals ** 2).sum(axis=0))
        std[std < np.finfo(np.float).eps] = 1.  // avoid numerical problems
        signals /= std
    return signals
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilearn/nilearn
Commit Name: 6704c535b8c59ab3b9b98c0489a051654c1ee727
Time: 2013-04-05
Author: philippe.gervais@inria.fr
File Name: nisl/signals.py
Class Name:
Method Name: _standardize


Project Name: pymc-devs/pymc3
Commit Name: d41939a04dffd9737252dc9e58ab2de11f4e663e
Time: 2016-05-11
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc3/model.py
Class Name:
Method Name: as_tensor


Project Name: dmlc/gluon-nlp
Commit Name: d63abb86304d5ceca8ec14109a4812258f9839ea
Time: 2019-09-24
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name: evaluate