numpy.matrix.I#
property
- propertymatrix.I#
Returns the (multiplicative) inverse of invertibleself.
- Parameters:
- None
- Returns:
- retmatrix object
Ifself is non-singular,ret is such that
ret*self
==self*ret
==np.matrix(np.eye(self[0,:].size))
all returnTrue
.
- Raises:
- numpy.linalg.LinAlgError: Singular matrix
Ifself is singular.
See also
Examples
>>>m=np.matrix('[1, 2; 3, 4]');mmatrix([[1, 2], [3, 4]])>>>m.getI()matrix([[-2. , 1. ], [ 1.5, -0.5]])>>>m.getI()*mmatrix([[ 1., 0.], # may vary [ 0., 1.]])
On this page