svd-js
svd-js copied to clipboard
ZeroDivisionError: float division by zero
Hi, how did you handle "ZeroDivisionError: float division by zero"?
Many lines occurred these problems, and it might result in the left singular vector(matrix) with all zero components.
For example, for
c = f/z
, I modified to
c = (f/z if z != 0 else 0)
(for python)