@@ -6,7 +6,8 @@ module HigherOrderFns
6
6
# particularly map[!]/broadcast[!] for SparseVectors and SparseMatrixCSCs at present.
7
7
import Base: map, map!, broadcast, broadcast!
8
8
import Base. Broadcast: _containertype, promote_containertype,
9
- broadcast_indices, broadcast_c, broadcast_c!
9
+ broadcast_indices, _broadcast_indices,
10
+ broadcast_c, broadcast_c!
10
11
11
12
using Base: front, tail, to_shape
12
13
using .. SparseArrays: SparseVector, SparseMatrixCSC, AbstractSparseVector,
900
901
# (10) broadcast[!] over combinations of broadcast scalars and sparse vectors/matrices
901
902
902
903
# broadcast shape promotion for combinations of sparse arrays and other types
903
- broadcast_indices (:: Type{AbstractSparseArray} , A) = indices (A)
904
+ _broadcast_indices (:: Type{AbstractSparseArray} , A) = indices (A)
904
905
# broadcast container type promotion for combinations of sparse arrays and other types
905
906
_containertype (:: Type{<:SparseVecOrMat} ) = AbstractSparseArray
906
907
# combinations of sparse arrays with broadcast scalars should yield sparse arrays
@@ -984,7 +985,7 @@ struct PromoteToSparse end
984
985
# broadcast containertype definitions for structured matrices
985
986
StructuredMatrix = Union{Diagonal,Bidiagonal,Tridiagonal,SymTridiagonal}
986
987
_containertype (:: Type{<:StructuredMatrix} ) = PromoteToSparse
987
- broadcast_indices (:: Type{PromoteToSparse} , A) = indices (A)
988
+ _broadcast_indices (:: Type{PromoteToSparse} , A) = indices (A)
988
989
989
990
# combinations explicitly involving Tuples and PromoteToSparse collections
990
991
# divert to the generic AbstractArray broadcast code
0 commit comments