Skip to content
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

DOC: tweak np.round docstring to clarify floating-point error #14503

Merged
merged 1 commit into from Sep 14, 2019

Conversation

ahaldane
Copy link
Member

Clarifies the docstring based on this discussion
https://mail.python.org/pipermail/numpy-discussion/2019-September/080034.html
https://mail.python.org/pipermail/numpy-discussion/2019-September/080044.html

To summarize, the behavior:

>>> np.round(16.055, 2), round(16.055, 2)  # equals 16.0549999999999997
(16.06, 16.05)

shows that floating-point error occurs for small values, not just large values like the np.round docstring says.

So this PR removes the red-herring comment about large values.

@mattip
Copy link
Member

mattip commented Sep 14, 2019

Thanks @ahaldane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants