Slicing/reshaping numpy array challenge
<p>I have a Numpy array of thousands of values like: </p>

<pre><code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
</code></pre>

<p>and I'd like to reshape the array to be able to vectorize a calculation on segments of the array of fixed-width like this: </p>

<pre><code>[[0, 1, 2, 3],
 [1, 2, 3, 4],
 [2, 3, 4, 5],
 ...]
</code></pre>

<p>What's the most efficient way to do this?  </p>