From 1f2bdff65f73ab3d10857c9e2b578363b1a7e203 Mon Sep 17 00:00:00 2001 From: Christian Kurz Date: Fri, 13 Oct 2017 20:54:02 +0200 Subject: [PATCH] hint to `mapslices` from `map` "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 [#23788] --- base/abstractarray.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 3795ae4eb9df0..5fc553a0d5b0b 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -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])