Skip to content

Commit 6a0c667

Browse files
authored
Fix documentation and argument name for Tensor.normal_(mean, stddev) (pytorch#652)
1 parent a1bd4ef commit 6a0c667

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

torch/_tensor_docs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -991,10 +991,10 @@ def callable(a, b) -> number
991991

992992
add_docstr(torch._C.FloatTensorBase.normal_,
993993
"""
994-
normal_(generator=None, mean=0, var=1)
994+
normal_(generator=None, mean=0, stddev=1)
995995
996996
Fills this tensor with elements samples from the normal distribution
997-
parameterized by :attr:`mean` and :attr:`var`.
997+
parameterized by :attr:`mean` and :attr:`stddev`.
998998
""")
999999

10001000
add_docstr(torch._C.FloatTensorBase.numel,

torch/csrc/generic/methods/TensorRandom.cwrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void THTensor_(normal_means_stddevs)(THTensor *self, THGenerator *gen, TH
151151
default: THPDefaultGenerator->cdata
152152
- arg: real mean
153153
default: 0
154-
- arg: real var
154+
- arg: real stddev
155155
default: 1
156156
]]
157157

0 commit comments

Comments
 (0)