Skip to content

Instantly share code, notes, and snippets.

@justinchuby
Last active May 5, 2020 15:10
Show Gist options
  • Save justinchuby/548ce0dce215c470e7ac6a6db4a77007 to your computer and use it in GitHub Desktop.
Save justinchuby/548ce0dce215c470e7ac6a6db4a77007 to your computer and use it in GitHub Desktop.
Use SVD to solve Ax=0 #linearalgebra #numpy
def solve_Ax_eq_zero(A):
_, _, vh = np.linalg.svd(A)
x = vh.T[:, -1]
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment