Initial implementation of nanmean (#62671)
authorHeitor Schueroff <heitorschueroff@fb.com>
Mon, 13 Sep 2021 12:50:27 +0000 (05:50 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 13 Sep 2021 12:53:58 +0000 (05:53 -0700)
commitb37503e4527ebed05fd4ac644b47dedb4ed1c1fd
treed1ab1a1bca20c12dbf5266d91f4d0672c8ba672c
parent8535418a06d75025541370cc656a8b6a0330ca0d
Initial implementation of nanmean (#62671)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62671

Very crude first implementation of `torch.nanmean`. The current reduction kernels do not have good support for implementing nan* variants. Rather than implementing new kernels for each nan* operator, I will work on new reduction kernels with support for a `nan_policy` flag and then I will port `nanmean` to use that.

**TODO**

- [x] Fix autograd issue

Test Plan: Imported from OSS

Reviewed By: malfet

Differential Revision: D30515181

Pulled By: heitorschueroff

fbshipit-source-id: 303004ebd7ac9cf963dc4f8e2553eaded5f013f0
aten/src/ATen/core/aten_interned_strings.h
aten/src/ATen/native/ReduceOps.cpp
aten/src/ATen/native/native_functions.yaml
docs/source/tensors.rst
docs/source/torch.rst
torch/_tensor_docs.py
torch/_torch_docs.py
torch/overrides.py
torch/testing/_internal/common_methods_invocations.py