From ee0b75a3d2b60cf82ccc0acb0fb2b1e581e1bfee Mon Sep 17 00:00:00 2001 From: Ir1dXD Date: Tue, 5 Jun 2018 22:15:36 +0800 Subject: [PATCH] docs: Add warning to torch.repeat() (#8116) * docs: Add warning to torch.repeat() closes #7993 * docs: Add links for numpy functions * docs: Break the too long line --- torch/_tensor_docs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/torch/_tensor_docs.py b/torch/_tensor_docs.py index b67cfbe7fbaa2..62871a21ce2f8 100644 --- a/torch/_tensor_docs.py +++ b/torch/_tensor_docs.py @@ -1558,6 +1558,13 @@ def callable(a, b) -> number Unlike :meth:`~Tensor.expand`, this function copies the tensor's data. +.. warning:: + + :func:`torch.repeat` behaves differently from + `numpy.repeat `_, + but is more similar to + `numpy.tile `_. + Args: sizes (torch.Size or int...): The number of times to repeat this tensor along each dimension