提交 36d3c2ac 编写于 作者: M Megvii Engine Team

docs(mge/tensor): add dtype and device doc ref for typehint result

GitOrigin-RevId: a9adb93889286c54cd8f9acfecc4b2ee2cb56941
上级 22286579
......@@ -111,13 +111,19 @@ class Tensor(_Tensor, ArrayMethodMixin):
return super().shape
@property
def device(self) -> CompNode:
r"""Returns a string represents the device a :class:`~.Tensor` storaged on."""
def device(self):
r"""Returns a string represents the device a :class:`~.Tensor` storaged on.
.. seealso:: see :ref:`tensor-device` for more details.
"""
return super().device
@property
def dtype(self) -> np.dtype:
r"""Returns a :class:`numpy.dtype` object represents the data type of a :class:`~.Tensor`."""
r"""Returns a :class:`numpy.dtype` object represents the data type of a :class:`~.Tensor`.
.. seealso:: see :ref:`tensor-dtype` for more details.
"""
return super().dtype
@property
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册