08be819a5fd8edd74a59dcc363c9e7694ca009d2,neurodsp/utils/outliers.py,,remove_nans,#Any#,8

Before Change


    

    sig_nans = np.isnan(sig)
    sig_removed = sig[np.where(~np.isnan(sig))]

    return sig_removed, sig_nans

After Change


    if sig.ndim == 1:
        sig_removed = sig[np.where(~sig_nans)]
    elif sig.ndim == 2:
        sig_removed = sig[~sig_nans].reshape(sig_nans.shape[0], sum(~sig_nans[0, :]))
        sig_nans = sig_nans[0, :]
    else:
        raise ValueError("Only 1d or 2d arrays supported.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: neurodsp-tools/neurodsp
Commit Name: 08be819a5fd8edd74a59dcc363c9e7694ca009d2
Time: 2019-09-01
Author: tdonoghue@ucsd.edu
File Name: neurodsp/utils/outliers.py
Class Name:
Method Name: remove_nans


Project Name: elfi-dev/elfi
Commit Name: eb8c188803d258dbcae61764ffe8085db627424b
Time: 2019-11-25
Author: 33959025+hpesonen@users.noreply.github.com
File Name: elfi/examples/daycare.py
Class Name:
Method Name: daycare


Project Name: nilearn/nilearn
Commit Name: 380c0681bf8b9252befec411d12b71b0678222c6
Time: 2015-02-10
Author: danilobzdok@gmail.com
File Name: nilearn/input_data/tests/test_nifti_masker.py
Class Name:
Method Name: test_mask_4d


Project Name: rusty1s/pytorch_geometric
Commit Name: 43868e302d5f0e8f2e427cd93cdb42911aca713f
Time: 2021-02-27
Author: jinu.sunil@gmail.com
File Name: torch_geometric/nn/norm/diff_norm.py
Class Name: DiffNorm
Method Name: groupDistanceRatio