Created
September 24, 2016 02:34
-
-
Save sudodo/485743086259fc4038daa973ce20e7c0 to your computer and use it in GitHub Desktop.
Fast inverse matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def faster_inverse(A): | |
b = np.identity(A.shape[1], dtype=A.dtype) | |
n_eq = A.shape[1] | |
n_rhs = A.shape[1] | |
pivots = np.zeros(n_eq, np.intc) | |
identity = np.eye(n_eq) | |
def lapack_inverse(a): | |
b = np.copy(identity) | |
pivots = zeros(n_eq, np.intc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment