pytorch/torch
Heitor Schueroff de Souza 199435af90 Update median doc to note return value of even-sized input (#44562)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/44562

Add a note that torch.median returns the smaller of the two middle elements for even-sized input and refer user to torch.quantile for the mean of the middle values.

fixes https://github.com/pytorch/pytorch/issues/39520

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D23657208

Pulled By: heitorschueroff

fbshipit-source-id: 2747aa652d1e7f10229d9299b089295aeae092c2
2020-09-14 13:18:33 -07:00
..
_C add typing annotations for a few torch.utils.* modules (#43806) 2020-09-11 10:20:55 -07:00
autograd Enable torch.autograd typechecks (#44451) 2020-09-10 13:37:29 -07:00
backends Enable TF32 support for cuDNN (#40737) 2020-09-01 15:34:24 -07:00
contrib Fix exception chaining in torch/ (#43836) 2020-08-31 20:26:23 -07:00
csrc [static runtime] Swap to out-variant compatible nodes (#44127) 2020-09-14 12:38:25 -07:00
cuda adds list_gpu_processes function (#44616) 2020-09-14 09:54:32 -07:00
distributed Add a CONTRIBUTING.md for the distributed package. (#44224) 2020-09-10 14:58:00 -07:00
distributions Check for internal memory overlap in some indexing-type functions (#43423) 2020-09-02 08:51:50 -07:00
fft Adds fft namespace (#41911) 2020-08-06 00:20:50 -07:00
for_onnx
futures
fx [FX] Minor fixups in Graph printout (#44214) 2020-09-08 14:45:32 -07:00
jit add typing annotations for a few torch.utils.* modules (#43806) 2020-09-11 10:20:55 -07:00
legacy
lib [NCCL] Fix NCCL_BLOCKING_WAIT functionality with Async Error Handling (#44411) 2020-09-10 20:57:55 -07:00
linalg Add torch.linalg.norm (#42749) 2020-08-28 18:28:33 -07:00
multiprocessing
nn Remove an extra empty line in the warning comments. (#44622) 2020-09-14 11:15:35 -07:00
onnx [JIT] dont optimize device dtype on inline (#43363) 2020-09-11 17:29:54 -07:00
optim Add reset_grad() function (#44423) 2020-09-09 22:05:45 -07:00
quantization [quant][graphmode][fx][fix] Remove qconfig in convert (#44526) 2020-09-11 15:51:47 -07:00
sparse Fix type annotations for torch.sparse, enable in CI (#43108) 2020-08-17 14:40:11 -07:00
testing [numpy] Add torch.exp2 (#44184) 2020-09-14 04:05:37 -07:00
utils Add HIP/ROCm version to collect_env.py (#44106) 2020-09-14 09:19:18 -07:00
__config__.py
__future__.py
__init__.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
_appdirs.py
_classes.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
_jit_internal.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
_linalg_utils.py Support custom exception message (#41907) 2020-08-01 13:03:45 -07:00
_lobpcg.py Add __torch_function__ for methods (#37091) 2020-08-05 20:44:13 -07:00
_lowrank.py Add __torch_function__ for methods (#37091) 2020-08-05 20:44:13 -07:00
_namedtensor_internals.py
_ops.py
_six.py Delete raise_from from torch._six (#43981) 2020-09-01 15:46:18 -07:00
_storage_docs.py
_tensor_docs.py [numpy] Add torch.exp2 (#44184) 2020-09-14 04:05:37 -07:00
_tensor_str.py [quant] Create PerRowQuantizer for floating point scale and zero_point (#42612) 2020-08-13 11:20:53 -07:00
_torch_docs.py Update median doc to note return value of even-sized input (#44562) 2020-09-14 13:18:33 -07:00
_utils_internal.py Fix exception chaining in torch/ (#43836) 2020-08-31 20:26:23 -07:00
_utils.py [caffe2][torch] correctly re-raise Manifold StorageException 2020-08-28 11:41:10 -07:00
_VF.py Address JIT/Mypy issue with torch._VF (#43454) 2020-08-25 09:23:54 -07:00
_vmap_internals.py vmap: fixed to work with functools.partial (#43028) 2020-08-17 13:36:49 -07:00
abi-check.cpp
CMakeLists.txt Use compile time cudnn version if linking with it statically (#44402) 2020-09-09 11:33:41 -07:00
custom_class_detail.h
custom_class.h Adding a version serialization type to ConvPackedParam (#43086) 2020-08-28 15:41:30 -07:00
extension.h
functional.py Deprecate torch.norm and torch.functional.norm (#44321) 2020-09-10 01:16:41 -07:00
hub.py Fix torch.hub for new zipfile format. (#42333) 2020-08-20 14:54:02 -07:00
library.h Apply selective build on RNN operators (#44132) 2020-09-05 23:47:51 -07:00
overrides.py [numpy] Add torch.exp2 (#44184) 2020-09-14 04:05:37 -07:00
py.typed
quasirandom.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
random.py Fix manual seed to unpack unsigned long (#42206) 2020-08-11 18:05:34 -07:00
README.txt
script.h
serialization.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
storage.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
tensor.py [BE] Use f-string in various Python functions (#44161) 2020-09-04 07:38:25 -07:00
types.py Fix type annotations for a number of torch.utils submodules (#42711) 2020-08-14 18:12:48 -07:00

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.