Skip to content

Commit 60138f5

Browse files
committed
add some disambiguating definitions for sparse map
1 parent 332c568 commit 60138f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

base/sparse/higherorderfns.jl

+4
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ end
6363

6464
# (2) map[!] entry points
6565
map{Tf}(f::Tf, A::SparseVecOrMat) = _noshapecheck_map(f, A)
66+
map{Tf,N}(f::Tf, A::SparseMatrixCSC, Bs::Vararg{SparseMatrixCSC,N}) =
67+
(_checksameshape(A, Bs...); _noshapecheck_map(f, A, Bs...))
6668
map{Tf,N}(f::Tf, A::SparseVecOrMat, Bs::Vararg{SparseVecOrMat,N}) =
6769
(_checksameshape(A, Bs...); _noshapecheck_map(f, A, Bs...))
70+
map!{Tf,N}(f::Tf, C::SparseMatrixCSC, A::SparseMatrixCSC, Bs::Vararg{SparseMatrixCSC,N}) =
71+
(_checksameshape(C, A, Bs...); _noshapecheck_map!(f, C, A, Bs...))
6872
map!{Tf,N}(f::Tf, C::SparseVecOrMat, A::SparseVecOrMat, Bs::Vararg{SparseVecOrMat,N}) =
6973
(_checksameshape(C, A, Bs...); _noshapecheck_map!(f, C, A, Bs...))
7074
function _noshapecheck_map!{Tf,N}(f::Tf, C::SparseVecOrMat, A::SparseVecOrMat, Bs::Vararg{SparseVecOrMat,N})

0 commit comments

Comments
 (0)