-
-
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
Some more compat annotations #30297
Some more compat annotations #30297
Conversation
Compat annotation for rank(A; rtol=..., atol=...), #29926.
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 know what the convention is, if any, for where to put the annotation within docstrings, but I would have voted for the end, after the examples. That said, you've done a bunch of these already, so I fully trust your judgement here. 😉
Imagine how disappointed you would be after reading about an amazing function and even looked how useful it is from the examples, just to see that you have the wrong Julia version! |
@@ -713,7 +713,7 @@ end | |||
|
|||
""" | |||
rank(A::AbstractMatrix; atol::Real=0, rtol::Real=atol>0 ? 0 : n*ϵ) | |||
rank(A::AbstractMatrix, rtol::Real) = rank(A; rtol=rtol) # to be deprecated in Julia 2.0 | |||
rank(A::AbstractMatrix, rtol::Real) |
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.
Is this change intentional?
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.
Yes, I included that information in the note, and we have not used this style anywhere else.
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.
Agree, we should only document the methods and keywords that we actually want people to use. Any other supported-for-compatibility but no-longer-recommended methods/keywords should be in notes like this.
Co-Authored-By: fredrikekre <[email protected]>
!!! compat "Julia 1.1" | ||
The `atol` and `rtol` keyword arguments requires at least Julia 1.1. | ||
In Julia 1.0 `rtol` is available as a positional argument, but this | ||
will be deprecated in Julia 2.0. |
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.
"also available"
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.
No, on 1.0 it is not available as a kwarg.
Compat annotation for
unique!(f, A)
, #30141.Compat annotation for
rank(A; rtol=..., atol=...)
, #29926.