if np.linalg.norm(new_ranks - ranks, 1) < tol: break ranks = new_ranks