-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Doc language fixes #41643
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 language fixes #41643
Conversation
| Returns a new tensor with boolean elements representing if each element is `+/-INF` or not. | ||
| Complex values are infinite when their real and/or imaginary part is infinite. | ||
| Tests if each element of :attr:`input` is infinite |
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 follow the template for other comparison ops here,
Returns a new tensor with boolean elements representing if each element is `infinite` (equal to positive or negative infinity) or not.
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 was actually trying to explicitly avoid that templating because I thought the language of "Returns a new tensor..." was out of place with other language in our docs that describes the computation rather than the return type in the summary.
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.
Then should other ops (comparison, isfinite etc) be updated too?
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.
Yes. This PR is just to get the language right before changing all of them.
torch/_torch_docs.py
Outdated
| (positive or negative infinity) or not. | ||
| .. note:: | ||
| Complex values are infinite when their real part, imaginary part, or real and |
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 like the previous real and/or imaginary part it infinite better.
torch/_torch_docs.py
Outdated
| Returns: | ||
| Tensor: a boolean tensor with True where :attr:`input` is `+/-INF` and False elsewhere | ||
| A boolean tensor with True where :attr:`input` is infinite and False elsewhere |
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.
in keeping with previously used wording A boolear tensor that is True ...
facebook-github-bot
left a comment
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.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Updates doc for abs, acos, and isinf for clarity and consistency.