We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98c49f1 commit a8d4571Copy full SHA for a8d4571
src/SliceMap.jl
@@ -99,7 +99,7 @@ MapCols{d}(f::Function, M::AbstractMatrix, args...) where {d} =
99
_MapCols(map, f, M, Val(d), args...)
100
101
function _MapCols(map::Function, f::Function, M::Matrix{T}, ::Val{d}, args...) where {T,d}
102
- d == size(M,1) || error("expected M with $d columns")
+ d == size(M,1) || error("expected M with $d rows")
103
A = reinterpret(SArray{Tuple{d}, T, 1, d}, vec(M))
104
B = map(col -> surevec(f(col, args...)), A)
105
reduce(hcat, B)
@@ -112,7 +112,7 @@ _MapCols(map::Function, f::Function, M::TrackedMatrix, dval, args...) =
112
∇MapCols(map, f, M, dval, args...)
113
114
function ∇MapCols(bigmap::Function, f::Function, M::AbstractMatrix{T}, dval::Val{d}, args...) where {T,d}
115
116
k = size(M,2)
117
118
A = reinterpret(SArray{Tuple{d}, T, 1, d}, vec(data(M)))
0 commit comments