rhythmic_segments.helpers¶
Interval utilities shared across rhythmic segments components.
Functions¶
|
Split data into contiguous blocks using |
Module Contents¶
- rhythmic_segments.helpers.split_into_blocks(data: Sequence[float] | numpy.ndarray | pandas.DataFrame, boundaries: collections.abc.Iterable[bool], *, drop_empty: bool = True, copy: bool = True) List[numpy.ndarray | pandas.DataFrame] ¶
Split data into contiguous blocks using
boundaries
.Parameters¶
- dataSequence, np.ndarray, or pandas.DataFrame
Interval or metadata values to split.
- boundariesIterable[bool]
Boolean mask marking split points.
- drop_emptybool, optional
Drop zero-length blocks when
True
(default).- copybool, optional
Return copies of the underlying data when
True
(default).