-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Invalid docstring for numpy.fix (?) #27257
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
Comments
The behavior was changed by #26766. The change in behavior of Doesn't that change in behavior potentially break backwards compatibility for users expecting a float return type from all these functions? |
Thanks for the pointer. I'm personally fine with the change, but the patch you're pointing at doesn't update documentation, right? |
Right. The docs need to be updated to reflect the change in behavior. |
Ping @mtsokol. Would you mind updating the docs here? Maybe also a new release note for 2.1.1? |
@ngoldbaum Sure! |
does it mean doctest is not run on the docstring? |
It looks like the doctest for
@ev-br do you happen to know why scipy_doctest isn't catching this? |
the "doctester" calls
I suppose the tool can get a "be stricter" flag to check dtypes, too. EDIT: In fact, it's even more basic: there's an equality check before
|
So there are really two issues here: the documentation is not up to date, and doctests do not check dtype (and maybe other array attributes). I will open a new issue about doctests. |
First experiments: apparently there are numpy objects which are equal but not
This related because the OP is due to
|
Issue with current documentation:
The documentation for
numpy.fix
states it returns a float for integral values, but running the actual code make it return an integral value:In addition to this unconsistency, it worries me that docstring would be invalid... does that mean we're not running doctest?
Idea or request for content:
No response
The text was updated successfully, but these errors were encountered: