pytorch/docs
kshitij12345 5d45140d68 [numpy] torch.{all/any} : output dtype is always bool (#47878)
Summary:
BC-breaking note:

This PR changes the behavior of the any and all functions to always return a bool tensor. Previously these functions were only defined on bool and uint8 tensors, and when called on uint8 tensors they would also return a uint8 tensor. (When called on a bool tensor they would return a bool tensor.)

PR summary:

https://github.com/pytorch/pytorch/pull/44790#issuecomment-725596687

Fixes 2 and 3

Also Fixes https://github.com/pytorch/pytorch/issues/48352

Changes
* Output dtype is always `bool` (consistent with numpy) **BC Breaking (Previously used to match the input dtype**)
* Uses vectorized version for all dtypes on CPU
* Enables test for complex
* Update doc for `torch.all` and `torch.any`

TODO
* [x] Update docs
* [x] Benchmark
* [x] Raise issue on XLA

Pull Request resolved: https://github.com/pytorch/pytorch/pull/47878

Reviewed By: albanD

Differential Revision: D25714324

Pulled By: mruberry

fbshipit-source-id: a87345f725297524242d69402dfe53060521ea5d
2021-01-08 11:05:39 -08:00
..
caffe2 [Needs Review] Convert some files to Python3 (#49351) 2021-01-06 10:48:16 -08:00
cpp update breathe (#49407) 2020-12-15 21:47:07 -08:00
source [numpy] torch.{all/any} : output dtype is always bool (#47878) 2021-01-08 11:05:39 -08:00
.gitignore .gitignore for the docs folder 2019-10-08 12:18:30 -07:00
libtorch.rst DOC: Building libtorch using CMake (#44196) 2020-10-21 14:29:36 -07:00
make.bat Sphinx parallel build (#38785) 2020-05-21 13:03:55 -07:00
Makefile DOC: fail to build if there are warnings (#41335) 2020-07-28 22:33:44 -07:00
README.md Add docs/README.md to make existing doc build info more discoverable (#49286) 2020-12-16 11:55:45 -08:00
requirements.txt DOC: fix two build warnings (#41334) 2020-07-25 23:38:33 -07:00

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.