From d4f6a7bfede42de7fd8ecea341c8eda4a648f88f Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Thu, 26 Mar 2020 13:07:41 +0800 Subject: [PATCH] fix(mge): fix tensor docstring GitOrigin-RevId: 4dab166976f31d78062a044c4cf1ae0a6531b76d --- python_module/megengine/functional/tensor.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/python_module/megengine/functional/tensor.py b/python_module/megengine/functional/tensor.py index 9bdfc6202..570bd27f7 100644 --- a/python_module/megengine/functional/tensor.py +++ b/python_module/megengine/functional/tensor.py @@ -365,8 +365,7 @@ def shapeof(x: Tensor, axis=None): @wrap_io_tensor def dimshuffle(inp: Tensor, pattern: Iterable[int]) -> Tensor: - r - """ + r""" Swap shapes and strides according to given pattern :param inp: Input tensor @@ -408,8 +407,7 @@ def dimshuffle(inp: Tensor, pattern: Iterable[int]) -> Tensor: @wrap_io_tensor def reshape(inp: Tensor, target_shape: Iterable[int]) -> Tensor: - r - """ + r""" Reshape a tensor to given target shape; total number of logical elements must remain unchanged @@ -447,8 +445,7 @@ def reshape(inp: Tensor, target_shape: Iterable[int]) -> Tensor: @functools.wraps(dimshuffle) def transpose(*args, **kwargs): - r - """See :func:`dimshuffle` + r"""See :func:`dimshuffle` """ return dimshuffle(*args, **kwargs) -- GitLab