Skip to content

Commit ec37ce0

Browse files
committed
Extend generic sparse map[!]/broadcast[!] to sparse vectors and sparse vector/matrix combinations.
Extend generic sparse map[!]/broadcast[!] to sparse vectors and sparse vector/matrix combinations. Do so by introducing a common interface to SparseVector and SparseMatrixCSC for the purposes of map[!]/broadcast[!], and rewriting sparse map[!]/broadcast[!] against that interface. Relocate that code to a separate file/module base/sparse/higherorderfns.jl/SparseArrays.HigherOrderFns, loaded after definition of both SparseVector and SparseMatrixCSC.
1 parent b78c9af commit ec37ce0

File tree

4 files changed

+853
-764
lines changed

4 files changed

+853
-764
lines changed

base/sparse/abstractsparse.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ issparse{T, A<:AbstractSparseMatrix}(S::LinAlg.UnitLowerTriangular{T, A}) = true
2020
issparse{T, A<:AbstractSparseMatrix}(S::UpperTriangular{T, A}) = true
2121
issparse{T, A<:AbstractSparseMatrix}(S::LinAlg.UnitUpperTriangular{T, A}) = true
2222

23-
indtype{Tv,Ti}(S::AbstractSparseArray{Tv,Ti}) = Ti
23+
indtype{Tv,Ti}(S::AbstractSparseArray{Tv,Ti}) = (Base.@_pure_meta; Ti)

0 commit comments

Comments
 (0)