Skip to content

Commit 306605d

Browse files
authored
cholmod: correct the IndexStyle method additions (#650)
1 parent 74aaeeb commit 306605d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/solvers/cholmod.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ end
13581358
size(F::Factor) = (size(F, 1), size(F, 2))
13591359
axes(A::Union{Dense,Sparse,Factor}) = map(Base.OneTo, size(A))
13601360

1361-
IndexStyle(::Dense) = IndexLinear()
1361+
IndexStyle(::Type{<:Dense}) = IndexLinear()
13621362

13631363
size(FC::FactorComponent, i::Integer) = size(FC.F, i)
13641364
size(FC::FactorComponent) = size(FC.F)
@@ -1379,7 +1379,6 @@ function getindex(A::Dense{T}, i::Integer) where {T<:VTypes}
13791379
unsafe_load(Ptr{T}(s.x), i)
13801380
end
13811381

1382-
IndexStyle(::Sparse) = IndexCartesian()
13831382
function getindex(A::Sparse{T}, i0::Integer, i1::Integer) where T
13841383
s = unsafe_load(typedpointer(A))
13851384
!(1 <= i0 <= s.nrow && 1 <= i1 <= s.ncol) && throw(BoundsError())

0 commit comments

Comments
 (0)