Skip to content

Commit

Permalink
docs: Add warning to torch.repeat() (pytorch#8116)
Browse files Browse the repository at this point in the history
* docs: Add warning to torch.repeat()

closes pytorch#7993

* docs: Add links for numpy functions

* docs: Break the too long line
  • Loading branch information
Ir1d authored and soumith committed Jun 5, 2018
1 parent f5cd479 commit ee0b75a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions torch/_tensor_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html>`_,
but is more similar to
`numpy.tile <https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html>`_.
Args:
sizes (torch.Size or int...): The number of times to repeat this tensor along each
dimension
Expand Down

0 comments on commit ee0b75a

Please sign in to comment.