Why not just return non-zero sigmas? It is certainly legal to call `svd(A, 3)` on a rank-2 matrix `A` and users will be surprised to see an exception.