Skip to content

Commit

Permalink
avoid splatting single integer in circshift!
Browse files Browse the repository at this point in the history
  • Loading branch information
abraunst committed Dec 11, 2018
1 parent f0b9499 commit 971f2e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 971f2e2

Please sign in to comment.