Fix Tensor.uniform_ documentation to mention generator argument (#99510)

Fixes #98202 , mentioning support for generator arguments while providing an example of the function's use.

Would be happy to iterate on this if there are any issues.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99510
Approved by: https://github.com/soulitzer
This commit is contained in:
ts
2023-04-19 19:23:07 +00:00
committed by PyTorch MergeBot
parent d6d55f8590
commit 2aa35e6cc1

View File

@ -5937,7 +5937,7 @@ Example::
add_docstr_all(
"uniform_",
r"""
uniform_(from=0, to=1) -> Tensor
uniform_(from=0, to=1, *, generator=None) -> Tensor
Fills :attr:`self` tensor with numbers sampled from the continuous uniform
distribution: