is it possible to insert a matrix as an element of another matrix? for example, I have this matrix as c :
| A | b |
| -------- | -------------- |
| c11 | c12 |
| c21 | c22 |
now assume that I want to set this matrix as c11:
| g | h |
| -------- | -------------- |
| r11 | r12 |
| r21 | r22 |
is it possible in python?
CodePudding user response:
c11 = np.array([[r11,r12],[r21,r22]])
c12 = np.array([[r11,r12],[r21,r22]])
c21 = np.array([[r11,r12],[r21,r22]])
c22 = np.array([[r11,r12],[r21,r22]])
c = np.array([[c11,c12],[c21,c22]])