skdh.utility.windowing.get_windowed_view#
- skdh.utility.windowing.get_windowed_view(x, window_length, step_size, ensure_c_contiguity=False)#
Return a moving window view over the data
- Parameters:
- xnumpy.ndarray
1- or 2-D array of signals to window. Windows occur along the 0 axis. Must be C-contiguous.
- window_lengthint
Window length/size.
- step_sizeint
Step/stride size for windows - how many samples to step from window center to window center.
- ensure_c_contiguitybool, optional
Create a new array with C-contiguity if the passed array is not C-contiguous. This may result in the memory requirements significantly increasing. Default is False, which will raise a ValueError if x is not C-contiguous
- Returns:
- x_winnumpy.ndarray
2- or 3-D array of windows of the original data, of shape (…, L[, …])