Fix documentation for unfold(dimension=..., ...), fixes #18793 (#19020)
authorEdward Yang <ezyang@fb.com>
Tue, 9 Apr 2019 18:48:56 +0000 (11:48 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 9 Apr 2019 18:54:25 +0000 (11:54 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19020
ghimport-source-id: 8f31e51b79daba11939aa7992450984054713b9c

Differential Revision: D14851890

Pulled By: ezyang

fbshipit-source-id: 8498e86a63633fdfd9ecae9b7f85b773b75fe27a

torch/_tensor_docs.py

index 40aa94b..e9f5ba6 100644 (file)
@@ -2745,21 +2745,21 @@ Args:
 
 add_docstr_all('unfold',
                r"""
-unfold(dim, size, step) -> Tensor
+unfold(dimension, size, step) -> Tensor
 
 Returns a tensor which contains all slices of size :attr:`size` from
-:attr:`self` tensor in the dimension :attr:`dim`.
+:attr:`self` tensor in the dimension :attr:`dimension`.
 
 Step between two slices is given by :attr:`step`.
 
-If `sizedim` is the size of dimension :attr:`dim` for :attr:`self`, the size of
-dimension :attr:`dim` in the returned tensor will be
+If `sizedim` is the size of dimension :attr:`dimension` for :attr:`self`, the size of
+dimension :attr:`dimension` in the returned tensor will be
 `(sizedim - size) / step + 1`.
 
 An additional dimension of size :attr:`size` is appended in the returned tensor.
 
 Args:
-    dim (int): dimension in which unfolding happens
+    dimension (int): dimension in which unfolding happens
     size (int): the size of each slice that is unfolded
     step (int): the step between each slice