Fixed quantile nan propagation and implemented nanquantile (#44393)

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

torch.quantile now correctly propagates nan and implemented torch.nanquantile similar to numpy.nanquantile.

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D23649613

Pulled By: heitorschueroff

fbshipit-source-id: 5201d076745ae1237cedc7631c28cf446be99936
This commit is contained in:
Heitor Schueroff de Souza
2020-09-17 05:50:41 -07:00
committed by Facebook GitHub Bot
parent 99093277c0
commit 28085cbd39
10 changed files with 342 additions and 181 deletions

View File

@ -2544,6 +2544,13 @@ quantile(q, dim=None, keepdim=False) -> Tensor
See :func:`torch.quantile`
""")
add_docstr_all('nanquantile',
r"""
nanquantile(q, dim=None, keepdim=False) -> Tensor
See :func:`torch.nanquantile`
""")
add_docstr_all('q_scale',
r"""
q_scale() -> float