Skip to content

Commit

Permalink
Merge pull request #11880 from malmaud/mapslices_sig
Browse files Browse the repository at this point in the history
Ducktype function argument of mapslices
  • Loading branch information
simonster committed Jun 26, 2015
2 parents 4f4938e + e45be96 commit 2b07246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1133,8 +1133,8 @@ end
## transform any set of dimensions
## dims specifies which dimensions will be transformed. for example
## dims==1:2 will call f on all slices A[:,:,...]
mapslices(f::Function, A::AbstractArray, dims) = mapslices(f, A, [dims...])
function mapslices(f::Function, A::AbstractArray, dims::AbstractVector)
mapslices(f, A::AbstractArray, dims) = mapslices(f, A, [dims...])
function mapslices(f, A::AbstractArray, dims::AbstractVector)
if isempty(dims)
return map(f,A)
end
Expand Down

0 comments on commit 2b07246

Please sign in to comment.