Skip to content

Instantly share code, notes, and snippets.

@suminb
Created October 6, 2011 13:57
Show Gist options
  • Save suminb/1267455 to your computer and use it in GitHub Desktop.
Save suminb/1267455 to your computer and use it in GitHub Desktop.
Pseudoinverse of a matrix
from numpy import inv, transpose
def pseudoinverse(U):
return inv(transpose(U) * U) * transpose(U)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment