-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add docstrings in numpy #617
Add docstrings in numpy #617
Conversation
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 for the PR!
keras_core/ops/numpy.py
Outdated
|
||
Example: | ||
>>> x = keras_core.ops.convert_to_tensor([1, -1]) | ||
array([0. , 3.1415927], dtype=float32) |
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.
You can remove the extra whitespace
keras_core/ops/numpy.py
Outdated
|
||
The quadrant (i.e., branch) is chosen so that `arctan2(x1, x2)` is the | ||
signed angle in radians between the ray ending at the origin and passing | ||
through the point (1,0), and the ray ending at the origin and passing |
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.
Use backticks around code keywords (and space after ,
)
keras_core/ops/numpy.py
Outdated
The quadrant (i.e., branch) is chosen so that `arctan2(x1, x2)` is the | ||
signed angle in radians between the ray ending at the origin and passing | ||
through the point (1,0), and the ray ending at the origin and passing | ||
through the point (x2, x1). (Note the role reversal: the “y-coordinate” is |
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.
Use "
as the quote character
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.
LGTM -- thank you!
Add more docstrings to functions in ops.numpy.
Covers all remaining functions starting with "a":
I largely copied the docs from numpy, adapting them when the arguments differed.