Caution
You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.9.1.
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
intervals[i, 0] <= intervals[i, 1] for all i
- Parameters
- intervalsnp.ndarray [shape=(n, 2)]
set of time intervals
- Returns
- validbool
True if intervals passes validation.