Closed
Description
opened on Apr 26, 2017
The standard linalg function isposdef
does not work for symmetric matrices (recent git master):
x = rand(5, 5)
x = x*x'
isposdef(x)
isposdef(Symmetric(x))
The last line fails with an error:
ERROR: MethodError: no method matching isposdef!(::Symmetric{Float64,Array{Float64,2}})
which I guess is caused by a missing definition. One workaround is to access underlying matrix directly but it is inconvenient:
isposdef(Symmetric(x).data)
I think this behavior is not correct and surprising for each user, I have not found any mention of such limitation in the documentation. There is an additional implementation for Diagonal matrices and this works fine:
isposdef(Diagonal(rand(1, 5)))
Metadata
Assignees
Labels
No labels
Activity