title: How do I create a sliding window with a 50% overlap with a numpy array?
body: <p>Say I have an array like so:</p>
  
  <pre><code>array([1, 2, 3, 4, 5, 5, 7, 8, 9, 10])
  </code></pre>
  
  <p>I want to change it to </p>
  
  <pre><code>array([1, 2, 3, 4]), array([3, 4, 5, 6]), array([5, 6, 7, 8]), array([7, 8, 9, 10])
  </code></pre>
  
  <p>Here the window size would be <code>4</code>, and step size would be <code>2</code>. </p>
  
  <p>How can I do this in a Python function?</p>