Skip to content

Commit 6a5ed42

Browse files
committed
postpone checksquare on inv(::SVD) to future PR
1 parent 2048988 commit 6a5ed42

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/svd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function pinv(F::SVD{T}; atol::Real=0, rtol::Real = (eps(real(float(oneunit(T)))
310310
end
311311

312312
function inv(F::SVD)
313-
checksquare(F)
313+
# TODO: checksquare(F)
314314
@inbounds for i in eachindex(F.S)
315315
iszero(F.S[i]) && throw(SingularException(i))
316316
end

test/svd.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, QRPivoted
5353
@test sf2.U*Diagonal(sf2.S)*sf2.Vt' m2
5454

5555
@test ldiv!([0., 0.], svd(Matrix(I, 2, 2)), [1., 1.]) [1., 1.]
56-
@test_throws DimensionMismatch inv(svd(Matrix(I, 3, 2)))
56+
# @test_throws DimensionMismatch inv(svd(Matrix(I, 3, 2)))
5757
@test inv(svd(Matrix(I, 2, 2))) I
5858
@test inv(svd([1 2; 3 4])) [-2.0 1.0; 1.5 -0.5]
59-
@test pinv(svd([1 0 1; 0 1 0])) [0.5 0.0; 0.0 1.0; 0.5 0.0]
59+
@test inv(svd([1 0 1; 0 1 0])) [0.5 0.0; 0.0 1.0; 0.5 0.0]
6060
@test_throws SingularException inv(svd([0 0; 0 0]))
6161
@test inv(svd([1+2im 3+4im; 5+6im 7+8im])) [-0.5 + 0.4375im 0.25 - 0.1875im; 0.375 - 0.3125im -0.125 + 0.0625im]
6262
end

0 commit comments

Comments
 (0)