Skip to content

Conversation

@mruberry
Copy link
Collaborator

Updates doc for abs, acos, and isinf for clarity and consistency.

@mruberry mruberry requested a review from ngimel July 19, 2020 07:16
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
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

(positive or negative infinity) or not.
.. note::
Complex values are infinite when their real part, imaginary part, or real and
Copy link
Collaborator

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.

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
Copy link
Collaborator

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 ...

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in bd42e1a.

@mruberry mruberry deleted the doc_fixes branch August 21, 2020 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants