pymovements.transforms.cut_into_subsequences
- pymovements.transforms.cut_into_subsequences(arr: ndarray, window_size: int, keep_padded: bool = True) ndarray[source]
Example: if old seq len was 7700, window_size=1000: Input arr has: 144 x 7700 x n_channels Output arr has: 144*8 x 1000 x n_channels The last piece of each trial 7000-7700 gets padded with first 300 of this piece to be 1000 long
- Parameters
arr (np.ndarray) – uncut sequence
window_size (int) – size of subsequences
keep_padded (bool) – If True, last subsequence (which is padded) is kept in the output array.
- Return type
np.ndarray