I would checkout the np.hsplit and np.vsplit methods. You'll find details in the numpy api refrence.
If you do
blocks = [np.vsplit(i, 2) for i in np.hsplit(matrix, 2)]
then blocks will be an array containing your A,B,C and D matrices.