-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Better doc for jnp.rot90
#23451
Conversation
461801f
to
809a70b
Compare
jax/_src/numpy/lax_numpy.py
Outdated
An array containing the elements of ``m`` rotated by 90 degrees. | ||
|
||
Note: | ||
- Unlike :func:`numpy.rot90`, :func:`jax.numpy.rot90` will return a copy rather |
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.
I don't think we need to say this here – it's true of every JAX API.
The reason we included this text in lax_description
previously was that the numpy docs explicitly mention that the output is a view rather than a copy,. Now that we're not using NumPy's docs, we don't need text that corrects them.
If you're worried about this, you could mention under Returns:
that the result is a copy of the input
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.
Thanks! I have seen a similar note in APIs like jnp.transpose
and jnp.matrix_transpose
in the updated docs. So, I have included the note for this API also. Can we remove the note in those APIs also?
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.
Looks good! Can you squash the changes into one commit? Thanks!
3192ba2
to
ee67c41
Compare
Thanks! Squashed into single commit. |
Part of #21461
Rendered Preview: