-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate rol and ror in favor of circshift methods #23404
Conversation
|
|
I like |
If people prefer |
Matlab uses |
You're omitting APL, which calls this Sure, I can make it |
Could you include the word "rotate" in the help text so I can do |
|
Okay, added the word "rotate" to the docstrings. |
The FreeBSD and macOS errors are unrelated. |
Any feedback on this? |
``` | ||
""" | ||
ror(B::BitVector, i::Integer) = ror!(similar(B), B, i) | ||
circshift!(B::BitVector, i::Integer) = circshift!(B, B, i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a single-array circshift!
for non-bitvectors? I guess not, but it's a bit weird to have this only for one specialized array type (maybe re-open #16032).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've reopened #16032. Is the disconnect in methods blocking for this PR or can that be added later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that separately.
base/abstractarraymath.jl
Outdated
Circularly shift the data in an array. The second argument is a vector giving the amount to | ||
shift in each dimension. | ||
Circularly shift, i.e. rotate, the data in an array. The second argument is a vector giving | ||
the amount to shift in each dimension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… or an integer to only shift in the first dimension.
[ci skip]
There are two commits here. The first is a simple rename, deprecatingThe second deprecatescircshift
andcircshift!
in favor ofrotate
androtate!
, respectively.rol
/rol!
andror
/ror!
in favor of specialized methods ofrotate
/rotate!
circshift
/circshift!
.Fixes #19923.