Skip to content

Conversation

@xuhdev
Copy link
Collaborator

@xuhdev xuhdev commented May 22, 2019

Currently when the argument to isinf and isfinite is not tensor, a ValueError is raised. This, however, should be a TypeError, because the error is a type mismatch.

In the error message, "str(tensor)" is replaced by "repr(tensor)" because, when an error occurs, a printable representation of the object is likely more useful than the "informal" string version of the object.

Currently when the argument to isinf and isfinite is not tensor, a
ValueError is raised. This, however, should be a TypeError, because the
error is a type mismatch.

In the error message, "str(tensor)" is replaced by "repr(tensor)"
because, when an error occurs, a printable representation of the object
is likely more useful than the "informal" string version of the object.
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.

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in ef1fdc2.

@xuhdev xuhdev deleted the isinf branch May 24, 2019 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants