Sorry. I thought you have done it yourself.
(It is like image processing)
(replace a rectangle in an image)
If I have time tomorrow, I will do it.
Or if you have luck, someone is faster.
Or try to code it yourself.
Meanwhile you could read this or that:
https://stackoverflow.com/questions/3566...age-matrix
https://stackoverflow.com/questions/2650...x-in-numpy
Only I am curious:
How large can N be in your N²xN² matrix ?
(It is like image processing)
(replace a rectangle in an image)
If I have time tomorrow, I will do it.
Or if you have luck, someone is faster.
Or try to code it yourself.
Meanwhile you could read this or that:
https://stackoverflow.com/questions/3566...age-matrix
https://stackoverflow.com/questions/2650...x-in-numpy
Only I am curious:
How large can N be in your N²xN² matrix ?