Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise TypeError when the argument to isinf and isfinite is not a tens…
…or (pytorch#20817) Summary: 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. Pull Request resolved: pytorch#20817 Differential Revision: D15495624 Pulled By: ezyang fbshipit-source-id: 514198dcd723a7031818e50a87e187b22d51af73
- Loading branch information