if n > m:
v = svd_1d(matrixFor1D, epsilon=epsilon) # next singular vector
u_unnormalized = np.dot(A, v)
sigma = norm(u_unnormalized) # next singular value
u = u_unnormalized / sigma
else:
u = svd_1d(matrixFor1D, epsilon=epsilon) # next singular vector
v_unnormalized = np.dot(A.T, u)
sigma = norm(v_unnormalized) # next singular value
v = v_unnormalized /
In the above code you multiply by A or A.T. Shouldn't you be using the updated matrix: matrixFor1D or matrixFor1D.T?
In the above code you multiply by A or A.T. Shouldn't you be using the updated matrix: matrixFor1D or matrixFor1D.T?