-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
ENH: Add annotations to np.core.multiarray
part 3/4
#19237
Conversation
There is no `digitize` function in aforementioned namespace
@@ -1280,7 +1280,7 @@ | |||
|
|||
add_newdoc('numpy.core.multiarray', 'fromstring', | |||
""" | |||
fromstring(string, dtype=float, count=-1, sep='', *, like=None) | |||
fromstring(string, dtype=float, count=-1, *, sep, like=None) |
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.
fromstring
is currently a bit of an odd one. It does have a default value for sep
,
but it is deprecated, thus leaving us with a de facto mandatory parameter right in the middle of a function signature,
As a compromise I now documented it as a mandatory keyword-only parameter.
Any thoughts here?
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.
When was it deprecated?. Mandatory seems reasonable. Maybe it should get a better default value?
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.
By the looks of it in 1.14:
https://numpy.org/doc/stable/reference/generated/numpy.fromstring.html
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.
Mandatory seems reasonable. Maybe it should get a better default value?
I imagine that " "
would be the most obvious candidate here.
Thanks Bas. |
np.core.multiarray
part 3/4
The third part in a series of PRs for adding annotations to
np.core.multiarray
.Pretty much all remaining (public) functions in the namespace are now annotated,
with the exception of
nditer
andnested_iters
.