Skip to content

Commit b1982c4

Browse files
ShawnZhongfacebook-github-bot
authored andcommitted
Fix multiline signatures in docstring (#38768)
Summary: Fix #38694 See https://5533621-65600975-gh.circle-artifacts.com/0/docs/torch.html ## Index Page | Before | After | | --- | --- | | ![image](https://user-images.githubusercontent.com/6421097/82448124-ee1a4300-9a6e-11ea-9a48-cabf62eedd92.png) | ![image](https://user-images.githubusercontent.com/6421097/82448175-fd00f580-9a6e-11ea-8c79-c3dd6bac0b69.png) | | ![image](https://user-images.githubusercontent.com/6421097/82448234-0f7b2f00-9a6f-11ea-8221-19335ee60aa2.png) | ![image](https://user-images.githubusercontent.com/6421097/82448262-19049700-9a6f-11ea-9eea-ac2f71068d7f.png) | ## Detail Page | Before | After | | --- | --- | | ![image](https://user-images.githubusercontent.com/6421097/82448421-4fdaad00-9a6f-11ea-9909-29692cb8ca01.png) | ![image](https://user-images.githubusercontent.com/6421097/82448440-5701bb00-9a6f-11ea-8c07-d06cb0cdfa50.png) | | ![image](https://user-images.githubusercontent.com/6421097/82448496-68e35e00-9a6f-11ea-8db9-2d75a9328b3a.png) | ![image](https://user-images.githubusercontent.com/6421097/82448539-7567b680-9a6f-11ea-9c2e-a59eca4090c4.png) | ![image](https://user-images.githubusercontent.com/6421097/82448563-7d275b00-9a6f-11ea-97af-51f45969f473.png) | | ![image](https://user-images.githubusercontent.com/6421097/82448329-320d4800-9a6f-11ea-8d24-3d33445cf591.png) | ![image](https://user-images.githubusercontent.com/6421097/82448353-389bbf80-9a6f-11ea-8cc8-752d3fd0dee1.png) | Pull Request resolved: #38768 Differential Revision: D21691859 Pulled By: zou3519 fbshipit-source-id: 336158be450436554a1fa2105a5eedf24236c56b
1 parent acc181c commit b1982c4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

torch/_torch_docs.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4686,9 +4686,9 @@ def merge_dicts(*dicts):
46864686
""".format(**factory_like_common_args))
46874687

46884688
add_docstr(torch.randint,
4689-
r"""
4690-
randint(low=0, high, size, \*, generator=None, out=None, \
4691-
dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
4689+
"""
4690+
randint(low=0, high, size, \\*, generator=None, out=None, \
4691+
dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
46924692
46934693
Returns a tensor filled with random integers generated uniformly
46944694
between :attr:`low` (inclusive) and :attr:`high` (exclusive).
@@ -4729,8 +4729,8 @@ def merge_dicts(*dicts):
47294729
""".format(**factory_common_args))
47304730

47314731
add_docstr(torch.randint_like,
4732-
r"""
4733-
randint_like(input, low=0, high, dtype=None, layout=torch.strided, device=None, requires_grad=False,
4732+
"""
4733+
randint_like(input, low=0, high, dtype=None, layout=torch.strided, device=None, requires_grad=False, \
47344734
memory_format=torch.preserve_format) -> Tensor
47354735
47364736
Returns a tensor with the same shape as Tensor :attr:`input` filled with
@@ -6689,8 +6689,8 @@ def merge_dicts(*dicts):
66896689
""".format(**factory_common_args))
66906690

66916691
add_docstr(torch.full_like,
6692-
r"""
6693-
full_like(input, fill_value, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False,
6692+
"""
6693+
full_like(input, fill_value, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, \
66946694
memory_format=torch.preserve_format) -> Tensor
66956695
66966696
Returns a tensor with the same size as :attr:`input` filled with :attr:`fill_value`.

0 commit comments

Comments
 (0)