cmatrix.Matrix.insert_sub_matrix¶
- Matrix.insert_sub_matrix()¶
Insert the givven sub-matrix in the self matrix if and only if to_insert is smaller.
Parameters
Type
Description
to_ij
double tuple
The 2D coor representing the inserting point in the self matrix
to_insert
Matrix
The atrix to insert
Examples
>>> mat2=zeros(5,5) >>> mat2.insert_sub_matrix([1,1],xtract) >>> Print(mat2) | +0.000 | +0.000 | +0.000 | +0.000 | +0.000 | | +0.000 | +0.062 | +0.094 | +0.062 | +0.000 | | +0.000 | +0.094 | +0.141 | +0.094 | +0.000 | | +0.000 | +0.062 | +0.094 | +0.062 | +0.000 | | +0.000 | +0.000 | +0.000 | +0.000 | +0.000 | printed