I need help in building a block tridiagonal matrix using scipy sparse.
What I mean by that is for a square matrix B,
I need to create
[[B I 0 0 0]
[I B I 0 0]
[0 I B I 0]
[0 0 I B I]
[0 0 0 I B]]
Now, I want this to be programmatically done since the size of the matrix may vary.
Thanks!