I\'d like to use numpy to calculate the inverse. But I\'m getting an error:
\'numpy.ndarry\' object has no attribute I
To calculate inver
Another way to do this is to use the numpy matrix class (rather than a numpy array) and the I attribute. For example:
I
>>> m = np.matrix([[2,3],[4,5]]) >>> m.I matrix([[-2.5, 1.5], [ 2. , -1. ]])