Skip to content

Commit 03c210a

Browse files
committed
fix dim branches
1 parent d901d40 commit 03c210a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pdiagmat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function PDiagMat(dim::Int, diag::V) where {T,V<:AbstractVector{T}}
1212
end
1313

1414
function Base.getproperty(a::PDiagMat, s::Symbol)
15-
if s !== :dim
15+
if s === :dim
1616
return length(getfield(a, :diag))
1717
end
1818
return getfield(a, s)

src/pdmat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PDMat(mat::AbstractMatrix) = PDMat(mat, cholesky(mat))
2626
PDMat(fac::Cholesky) = PDMat(AbstractMatrix(fac), fac)
2727

2828
function Base.getproperty(a::PDMat, s::Symbol)
29-
if s !== :dim
29+
if s === :dim
3030
return size(getfield(a, :mat), 1)
3131
end
3232
return getfield(a, s)

src/pdsparsemat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PDSparseMat(mat::SparseMatrixCSC) = PDSparseMat(mat, cholesky(mat))
2626
PDSparseMat(fac::CholTypeSparse) = PDSparseMat(sparse(fac), fac)
2727

2828
function Base.getproperty(a::PDSparseMat, s::Symbol)
29-
if s !== :dim
29+
if s === :dim
3030
return size(getfield(a, :mat), 1)
3131
end
3232
return getfield(a, s)

0 commit comments

Comments
 (0)