diff --git a/src/utils.jl b/src/utils.jl index 3e1453f..1ea5fef 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -30,7 +30,7 @@ function _adddiag!(a::Union{Matrix, SparseMatrixCSC}, v::Real) return a end -function _adddiag!(a::Union{Matrix, SparseMatrixCSC}, v::Vector, c::Real) +function _adddiag!(a::Union{Matrix, SparseMatrixCSC}, v::AbstractVector, c::Real) @check_argdims eachindex(v) == axes(a, 1) == axes(a, 2) if c == one(c) for i in eachindex(v) @@ -46,7 +46,7 @@ end _adddiag(a::Union{Matrix, SparseMatrixCSC}, v::Real) = _adddiag!(copy(a), v) _adddiag(a::Union{Matrix, SparseMatrixCSC}, v::Vector, c::Real) = _adddiag!(copy(a), v, c) -_adddiag(a::Union{Matrix, SparseMatrixCSC}, v::Vector{T}) where {T<:Real} = _adddiag!(copy(a), v, one(T)) +_adddiag(a::Union{Matrix, SparseMatrixCSC}, v::AbstractVector{T}) where {T<:Real} = _adddiag!(copy(a), v, one(T)) function wsumsq(w::AbstractVector, a::AbstractVector)