librosa.util.valid_intervals

librosa.util.valid_intervals(intervals)[source]

Ensure that an array is a valid representation of time intervals:

  • intervals.ndim == 2
  • intervals.shape[1] == 2
Parameters:
intervals : np.ndarray [shape=(n, 2)]

set of time intervals

Returns:
valid : bool

True if intervals passes validation.