Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LinearAlgebra] Add isdiag/isposdef for Diagonal and UniformScaling #29638

Merged
merged 10 commits into from Oct 16, 2018
Prev

add tests for isposdef(::Diagonal) w/ cmplx/non-number eltype

  • Loading branch information...
dkarrasch committed Oct 15, 2018
commit 7dcd5684d9a5d8c996fb180a832fd3a6ac93bc9e
@@ -301,6 +301,10 @@ end
@testset "isposdef" begin
@test isposdef(Diagonal(1.0 .+ rand(n)))
@test !isposdef(Diagonal(-1.0 * rand(n)))
@test isposdef(Diagonal(complex(1.0, 0.0) .+ rand(n)))
@test !isposdef(Diagonal(complex(1.0, 1.0) .+ rand(n)))
@test isposdef(Diagonal([[1 0; 0 1], [1 0; 0 1]]))
@test !isposdef(Diagonal([[1 0; 0 1], [1 0; 1 1]]))
end

@testset "getindex" begin
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.