-
-
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 ipermute! in favor of invpermute! #25168
Conversation
NEWS.md
Outdated
@@ -816,6 +816,8 @@ Deprecated or removed | |||
and `unsafe_get`/`get` can be dropped or replaced with `coalesce`. | |||
`NullException` has been removed. | |||
|
|||
* `ipermute!` has been deprecated in favor of `invpermute` ([#25168]). |
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.
invpermute
-> invpermute!
?
81ef172
to
45acdb7
Compare
base/deprecated.jl
Outdated
@@ -363,6 +363,9 @@ end | |||
|
|||
@deprecate ipermutedims(A::AbstractArray,p) permutedims(A, invperm(p)) | |||
|
|||
# PR #25168 | |||
@deprecate ipermute!(a, p::AbstractVector) invpermute!(a, p::AbstractVector) |
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.
I don't think the deprecation target should have the type annotation, since @deprecate
turns it into function definition which means that on the RHS it's a type assertion.
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.
Right, thanks!
45acdb7
to
b1cfcab
Compare
b1cfcab
to
48b9629
Compare
The CI errors are unrelated (libgit2 and |
I can't see this deprecation—i.e. typing |
Looks like the deprecations where added to the wrong section and got removed in e858f55 |
This is to be consistent with
invperm
. And it's more explicit.