Skip to content

Commit

Permalink
hint to mapslices from map
Browse files Browse the repository at this point in the history
"can I apply function to columns of a matrix or rows ? something like map..."
I see this question asked a lot lately - so i think the best way is to hint at `mapslices` from the documentation of `map`.

See [JuliaLang#23788]
  • Loading branch information
Christian Kurz authored Oct 13, 2017
1 parent cbeab1a commit 1f2bdff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,8 @@ map(f, A::Union{AbstractArray,AbstractSet}) = collect_similar(A, Generator(f,A))
Transform collection `c` by applying `f` to each element. For multiple collection arguments,
apply `f` elementwise.
See also: [`mapslices`](@ref)
# Examples
```jldoctest
julia> map(x -> x * 2, [1, 2, 3])
Expand Down

0 comments on commit 1f2bdff

Please sign in to comment.