-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
circshift!(vec, n)
rotation direction is inconsistent with copying circshift(vec, n)
and mutating destination circshift!(dest, source, n)
versions. Judging by #46016 it appears that in-place circshift!(vec, n)
was introduced in 1.8
and implemented in #42678
julia> circshift(collect(1:3), 1)
3-element Vector{Int64}:
3
1
2
julia> circshift!(collect(1:3), 1)
3-element Vector{Int64}:
2
3
1
julia> circshift!(collect(1:3), collect(1:3), 1) # with destination and source
3-element Vector{Int64}:
3
1
2
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, ivybridge)
RaulDurandlaborg
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior