@@ -22,7 +22,7 @@ import LinearAlgebra: mul!, ldiv!, rdiv!, cholesky, adjoint!, diag, eigen, dot,
2222
2323import Base: adjoint, argmin, argmax, Array, broadcast, circshift!, complex, Complex,
2424 conj, conj!, convert, copy, copy!, copyto!, count, diff, findall, findmax, findmin,
25- float, getindex, imag, inv, kron, kron!, length, map, maximum, minimum, permute!, real,
25+ float, getindex, imag, inv, keytype, kron, kron!, length, map, maximum, minimum, permute!, real,
2626 rot180, rotl90, rotr90, setindex!, show, similar, size, sum, transpose,
2727 vcat, hcat, hvcat, cat, vec, reverse, reverse!
2828
@@ -84,7 +84,8 @@ if Base.USE_GPL_LIBS
8484 include (" solvers/spqr.jl" )
8585end
8686
87- zero (a:: AbstractSparseArray ) = spzeros (eltype (a), size (a)... )
87+ keytype (:: Type{A} ) where {Tv, Ti, A<: AbstractSparseArray{Tv,Ti} } = Ti
88+ zero (a:: AbstractSparseArray ) = spzeros (eltype (a), keytype (a), size (a)... )
8889
8990LinearAlgebra. diagzero (D:: Diagonal{<:AbstractSparseMatrix{T}} ,i,j) where {T} =
9091 spzeros (T, size (D. diag[i], 1 ), size (D. diag[j], 2 ))
0 commit comments