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

Confusing documentation for remainder and fmod #3563

Closed
callegar opened this issue Aug 1, 2013 · 0 comments · Fixed by #4400
Closed

Confusing documentation for remainder and fmod #3563

callegar opened this issue Aug 1, 2013 · 0 comments · Fixed by #4400

Comments

@callegar
Copy link

callegar commented Aug 1, 2013

Current numpy documentation for fmod says that "This is the NumPy implementation of the Python modulo operator %"

But this is confusing, since fmod and % give different results

fmod(-3,2) -> -1
-3 % 2 -> 1

Furthermore, the np.remainder documentation makes no mention of fmod, nor of sign conventions. This is bad, since users coming from Matlab may use remainder to translate the Matlab 'rem', while the two things are not the same.

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

Successfully merging a pull request may close this issue.

2 participants