title: Reshaping matrix with sliding steps
body: <p>Suppose i have a matrix that describes time series data, like this:</p>
  <p><a href="https://i.stack.imgur.com/fzVYx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fzVYx.png" alt="" /></a></p>
  <p>Each column represents an instant (second) in time series, and each row is a sample. I already implemented a function in python that splits each series in a way that i can have more samples like this:</p>
  <p><a href="https://i.stack.imgur.com/mj2Ad.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mj2Ad.png" alt="enter image description here" /></a></p>
  <p>However, i can generate even more samples if i create a window with fixed size and &quot;slide&quot; through samples:</p>
  <p>Supposing <code>sample_size=2</code> and <code>step=1</code>, the original matrix would generate the following output:</p>
  <p><a href="https://i.stack.imgur.com/TvI7d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TvI7d.png" alt="enter image description here" /></a></p>
  <p>Any examples on how this could be achieved are very welcome, because i will need to adapt it to a more complex problem.</p>