Skip to content

Instantly share code, notes, and snippets.

@sudodo
Created September 24, 2016 02:34
Show Gist options
  • Save sudodo/485743086259fc4038daa973ce20e7c0 to your computer and use it in GitHub Desktop.
Save sudodo/485743086259fc4038daa973ce20e7c0 to your computer and use it in GitHub Desktop.
Fast inverse matrix
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