neurodsp.utils.outliers.remove_nans

neurodsp.utils.outliers.remove_nans(sig)[source]

Drop any NaNs on the edges of an array.

Parameters
sig1d or 2d array

Signal to be checked for edge NaNs.

Returns
sig_removed1d or 2d array

Signal with NaN edges removed.

sig_nans1d array

Boolean array indicating where NaNs were in the original array.

Notes

For 2d arrays, this function assumes the same columns to be NaN across all rows.