I read this, but I wasn't able to create a (N^2 x N^2) - matrix A with (N x N) - matrices I on the lower and upper side-diagonal and T on the diagonal. I tried this
def prep_matrix(N):
I_N = np.identity(N)
NV = zeros(N*N - 1)
# now I want NV[0]=NV[1]=...=NV[N-1]:=I_N
but I have no idea how to fill NV with my matrices. What can I do? I found a lot on how to create tridiagonal matrices with scalars, but not with matrix blocks.