j2kun / svd

Python code implementing the power method for Singular Value Decomposition
https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/
104 stars 41 forks source link

fix issue with square matrices #3

Closed eugenelet closed 6 years ago

eugenelet commented 6 years ago

The branching criteria in svd function has to correspond to the one in svd_1d, or else it'll fail for square matrices. This fixes the issue #2 that I've made.

j2kun commented 6 years ago

The output is indeed wrong. Merging.