From 656d58782c5ae0fad3b66f430c2e1e50915ae468 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sun, 1 Jul 2018 11:04:23 +0200 Subject: [PATCH] fix [map]reduce deprecations, take 3 (#27884) --- base/deprecated.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/deprecated.jl b/base/deprecated.jl index 7229908ea9d46..3796918a25f24 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -1716,7 +1716,7 @@ end @deprecate_moved svds "Arpack" # PR #27711 -function reduce(op, v0, itr::AbstractArray; dims=nothing) +function reduce(op, v0, itr; dims=nothing) if dims === nothing depwarn("`reduce(op, v0, itr)` is deprecated, use `reduce(op, itr; init=v0)` instead", :reduce) return reduce(op, itr, init=v0) @@ -1727,7 +1727,7 @@ function reduce(op, v0, itr::AbstractArray; dims=nothing) end @deprecate foldl(op, v0, itr) foldl(op, itr; init=v0) @deprecate foldr(op, v0, itr) foldr(op, itr; init=v0) -function mapreduce(f, op, v0, itr::AbstractArray; dims=nothing) +function mapreduce(f, op, v0, itr; dims=nothing) if dims === nothing depwarn("`mapreduce(f, op, v0, itr)` is deprecated, use `mapreduce(f, op, itr; init=v0)` instead", :mapreduce) return mapreduce(f, op, itr; init=v0)