From 971f2e24e29dc1e6115a5bc600327c2ade3962bf Mon Sep 17 00:00:00 2001 From: Alfredo Braunstein Date: Tue, 11 Dec 2018 08:15:07 +0100 Subject: [PATCH] avoid splatting single integer in circshift! --- base/multidimensional.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index d5c03ec95d1358..49d09ea449e5c0 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -932,7 +932,10 @@ See also [`circshift`](@ref). axes(dest) == inds || throw(ArgumentError("indices of src and dest must match (got $inds and $(axes(dest)))")) _circshift!(dest, (), src, (), inds, fill_to_length(shiftamt, 0, Val(N))) end -circshift!(dest::AbstractArray, src, shiftamt) = circshift!(dest, src, (shiftamt...,)) + +_circshift_helper!(dest::AbstractArray, src, shiftamt) = circshift!(dest, src, (shiftamt...,)) +_circshift_helper!(dest::AbstractArray, src, shiftamt::Integer) = circshift!(dest, src, (shiftamt,)) +circshift!(dest::AbstractArray, src, shiftamt) = _circshift_helper!(dest, src, shiftamt) # For each dimension, we copy the first half of src to the second half # of dest, and the second half of src to the first half of dest. This