pytorch
649e6832 - Fix torch.nonzero type annotation (#51635)

Commit
3 years ago
Fix torch.nonzero type annotation (#51635) Summary: The overloads are a little tricky here. It's important that the overloads are such that it's unambiguous what `torch.nonzero(x)` will resolve to - so just specify defaults for one of the overloads. Also, `out` is left out of the second overload because a non-None value for `out` is not valid in combination with `as_tuple=True`. Closes gh-51434 Pull Request resolved: https://github.com/pytorch/pytorch/pull/51635 Reviewed By: zhangguanheng66 Differential Revision: D26279203 Pulled By: walterddr fbshipit-source-id: 8459c04fc9fbf7fc5f31b3f631aaac2f98b17ea6
Author
Parents
Loading