-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: Add annotations for np.core.arrayprint
#18032
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
Conversation
numpy/core/arrayprint.pyi
Outdated
void: Callable[[void], str] | ||
numpystr: Callable[[_CharLike], str] | ||
object: Callable[[object], str] | ||
str: Callable[[Any], str] # Unused but still present? |
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.
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.
Sounds fine to me.
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.
Done as of 82e5747.
Just to stress: the above-mentioned push does not deprecate anything,
it merely removes a few lines of unused code (and updates the docstring).
It's been non-functional for the past 8 years (xref numpy#459)
Co-Authored-By: Eric Wieser <425260+eric-wieser@users.noreply.github.com>
Thanks Bas. |
Per the title: this PR adds annotations for all array-printing-related functions in
np.core.arrayprint
.@charris continuing from #7859 (comment):
The signature of
np.set_printoptions
can quite easily be annotated as it turns out,so annotations can definitely help here with aforementioned issue.