-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Explicitly mention a function's aliases in the documentation #19717
Comments
Yes, depending on the version of NumPy I am not sure about this, but the aliased NumPy functions may be the way they are for historical reasons, i.e. to not break code written using older versions of NumPy. Newer code should probably use the new functions directly. |
Even the |
Not exactly. I jumped through the code of the current I guess that "best practice" would be to use whatever is more natural then, so using ar = np.array([1, 2, 2.32, 1.111])
ar = np.round(ar, out=ar) This performs the rounding in-place on |
I am working on this issue as part of pycon india conference. |
Co-authored-by: Mukulika Pahari <mukulikapahari@gmail.com>, Aparna Bushan <aparna.bushan@auto-grid.com>
The function is more commonly called `round`, both in the array API standard and in other array libraries (e.g., PyTorch has `round` but not around). Plus we have `ndarray.round`. `around` is heavily used, so keep it as an alias - but prefer `round`. For both this switch and for keeping the alias, xref numpygh-13877. Closes numpygh-19717
The function is more commonly called `round`, both in the array API standard and in other array libraries (e.g., PyTorch has `round` but not around). Plus we have `ndarray.round`. `around` is heavily used, so keep it as an alias - but prefer `round`. For both this switch and for keeping the alias, xref numpygh-13877. Closes numpygh-19717
The function is more commonly called `round`, both in the array API standard and in other array libraries (e.g., PyTorch has `round` but not around). Plus we have `ndarray.round`. `around` is heavily used, so keep it as an alias - but prefer `round`. For both this switch and for keeping the alias, xref numpygh-13877. Closes numpygh-19717
I was trying to find the
round
function in the documentation, but could not find it, making me falsely believe that it was deprecated. It was only after more research that I found that it was defined as an alias. I think this should be explicitly mentioned in the documentation (and for all other functions which have aliases too) to reduce confusion.The text was updated successfully, but these errors were encountered: