Browse Source

fix docstring for tensor.var, tensor.trace, rint

tags/v1.3.0
wangrao 4 years ago
parent
commit
fcda73ecf0
2 changed files with 3 additions and 2 deletions
  1. +2
    -2
      mindspore/common/tensor.py
  2. +1
    -0
      mindspore/numpy/math_ops.py

+ 2
- 2
mindspore/common/tensor.py View File

@@ -1412,7 +1412,7 @@ class Tensor(Tensor_):
Examples:
>>> import numpy as np
>>> from mindspore import Tensor
>>> x = Tensor(np.eye(3))
>>> x = Tensor(np.eye(3, dtype=np.float32))
>>> print(x.trace())
3.0
"""
@@ -1649,7 +1649,7 @@ class Tensor(Tensor_):
Examples:
>>> import numpy as np
>>> from mindspore import Tensor
>>> input_x = Tensor(np.array([1., 2., 3., 4.]))
>>> input_x = Tensor(np.array([1., 2., 3., 4.], np.float32))
>>> output = input_x.var()
>>> print(output)
1.25


+ 1
- 0
mindspore/numpy/math_ops.py View File

@@ -5707,6 +5707,7 @@ def rint(x, dtype=None):
Note:
Numpy arguments `out`, `where`, `casting`, `order`, `subok`, `signature`, and `extobj` are
not supported.
Ascend does not support dtype `float64` currently.

Args:
x (Union[float, list, tuple, Tensor]): Input tensor.


Loading…
Cancel
Save