title: 3D numpy array sliding window
body: <p>I'm currently trying to define a sliding window that would iterate over an 3D array.
  The dimension of my numpy array is <code>(270,5,22)</code>: so in total there are 270 times 5 days with 22 inputs captured.
  So the first row would have data for (01/09 - 05/09) each with their respective 22 of features.
  The second row out of the 270 would have data for (06/09 - 10/09) <code>(5,22)</code></p>
  <p>I would like to walk over this data meaning I want to create extra datapoints based  on
  <code>(01/09-05/09),(02/09-06/09),(03/09-07/09)</code> and so on.</p>
  <p>I've tried using :</p>
  <pre><code>s0,s1,s2 = X_train.strides #40,8,10816
  m,n,o = X_train.shape #270,5,22
  np.lib.stride_tricks.as_strided(X_train, shape=(y_shape,n,o), strides=(s1,s1,s2))
  </code></pre>
  <p>With y being a shape of :</p>
  <pre><code>(2914, _)
  </code></pre>
  <p>Which gives correct results for the beginning but gives me random numbers at the tail of the result.
  Any idea how to achieve this result or know how to achieve this in pandas ?</p>