I have a matrix m
which has some float
numbers. When I multiply it with the Identity matrix, some elements if the resulting matrix becomes zero. Actually, there should be no change in the matrix. Can anyone help me?
In the above image, there is no 0.013 in the matrix.
The *
operator in numpy corresponds to element-wise product of two arrays. Use the @
operator for matrix multiplication.
m@I