提交 5d32db8a 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

docs(mge/functional): fix docs error and refine description

GitOrigin-RevId: 62da6f0d60d13f38c3b7364293a28afbe916ced2
上级 f71251fd
......@@ -257,6 +257,7 @@ def isnan(inp: Tensor) -> Tensor:
Examples:
.. testcode::
from megengine import tensor
import megengine.functional as F
......@@ -265,6 +266,7 @@ def isnan(inp: Tensor) -> Tensor:
print(F.isnan(x))
.. testoutput::
Tensor([0 1 0], dtype=uint8)
"""
......@@ -280,6 +282,7 @@ def isinf(inp: Tensor) -> Tensor:
Examples:
.. testcode::
from megengine import tensor
import megengine.functional as F
......@@ -288,6 +291,7 @@ def isinf(inp: Tensor) -> Tensor:
print(F.isinf(x))
.. testoutput::
Tensor([0 1 0], dtype=uint8)
"""
......
......@@ -546,7 +546,7 @@ def eye(
comp_graph: Optional[CompGraph] = None
) -> Tensor:
"""
Fills the 2-dimensional input :class:`SymbolVar` with the identity matrix.
Returns a 2D tensor with ones on the diagonal and zeros elsewhere.
:param n: The number of rows
:param m: The number of columns. Default: None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册