I need to linearly interpolate a numpy array of dimension nx3x3
<p>I have a pretty simple question-</p>

<p>I'm looking for a way to interpolate a bunch of 3x3 matrices that I have stored in a 3D numpy array. Basically I need to repopulate a numpy array with intermediary matrix values calculated linearly just based on each element in their row/column.</p>

<p>Something that turns<br>
<code>[[1 1 1], [1 1 1], [1 1 1]]</code>   (thats a 2x3x3 np.array)<br>
<code>[[5 5 5], [5 5 5], [5 5 5]]</code></p>

<p>into</p>

<p><code>[[1 1 1], [1 1 1], [1 1 1]]</code><br>
<code>[[3 3 3], [3 3 3], [3 3 3]]</code>   (thats a 3x3x3 np.array)<br>
<code>[[5 5 5], [5 5 5], [5 5 5]]</code></p>

<p>but there needs to be about a hundred matrices between each matrix, then stored back into my Nx [3x3] numpy array. </p>