INNER CODE UNIT · Python

segment

matrix-profile-foundation/matrixprofile · matrixprofile/core.py:161

        segment = ts[i:i + window_size]
        search = (np.isinf(segment) | np.isnan(segment))
        
        if np.any(search):
            skip_loc[i] = True
        
    return skip_loc
    

def clean_nan_inf(ts):
    """
    Replaces nan and inf values with zeros per matrix profile algorithms.

    Parameters
    ----------
    ts: array_like
        Time series to clean.
    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…