cumulative length of the waveform over a segment for each variable in the segmented time
    series

def waveform_length(X):
    ''' cumulative length of the waveform over a segment for each variable in the segmented time
    series '''
    return np.sum(np.abs(np.diff(X, axis=1)), axis=1)