From 8fcbe8258d913e07db68a232dfed5568ac8ca5a0 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 1 Apr 2022 17:47:09 +0800 Subject: [PATCH] docs(mge/functional): fix functional.eye docstring GitOrigin-RevId: 2645af5e3593adcc83d869c3e65c5f04300d33f4 --- imperative/python/megengine/functional/tensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imperative/python/megengine/functional/tensor.py b/imperative/python/megengine/functional/tensor.py index 2935080d..dc093896 100755 --- a/imperative/python/megengine/functional/tensor.py +++ b/imperative/python/megengine/functional/tensor.py @@ -92,7 +92,8 @@ def eye(N, M=None, *, dtype="float32", device: Optional[CompNode] = None) -> Ten r"""Returns a 2D tensor with ones on the diagonal and zeros elsewhere. Args: - shape: a list, tuple or integer defining the shape of the output tensor. + N: an integer defining the number of rows. + M: an integer defining the number of columns. If ``M`` is not specified, the number of columns is ``N``. Default: ``None``. dtype: the desired data type of the output tensor. Default: ``float32``. device: the desired device of the output tensor. Default: if ``None``, use the default device (see :func:`~.megengine.get_default_device`).