I have a question that I suspect is trivial, but I have not stumbled onto any functions that have made such a solution obvious to me. Consider an array of the following form:
$\begin{pmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \\ \end{pmatrix}$
I want a simple way to partition this into matrices with identical dimension, which in this case, could be a set of four 2x2 matrices, resulting in
$\begin{pmatrix} \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} & \begin{pmatrix} a_{13} & a_{14} \\ a_{23} & a_{24} \\ \end{pmatrix} \\ \begin{pmatrix} a_{31} & a_{32} \\ a_{41} & a_{42} \\ \end{pmatrix} & \begin{pmatrix} a_{33} & a_{34} \\ a_{43} & a_{44} \\ \end{pmatrix} \end{pmatrix}$
Now, to generalize: I want a method to partition an $N\times N$ matrix into identical $d\times d$ submatrices, in exactly the way outlined here, and we assume of course that $d$ divides $N$. Could someone offer such a technique? Thanks in advance!