Created
June 6, 2019 11:40
-
-
Save jetnew/26c884011a091815ad2e60f1f58cb6af to your computer and use it in GitHub Desktop.
Rolling Windows using skimage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from skimage.util import view_as_windows | |
window_size = 5 | |
timeseries = np.array([1,2,3,4,5,6,7,8,9,10]) | |
trajectory_matrix = view_as_windows(timeseries, window_shape=window_size) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment