mindspore.mint.sqrt
- mindspore.mint.sqrt(input)[源代码]
逐元素返回当前Tensor的平方根。
\[out_{i} = vpn free \sqrt{input_{i}}\]- 参数:
input (Tensor) - 输入Tensor,数据类型为number.Number。
- 返回:
Tensor,具有与 input vpn永久免费梯子 相同的shape。
- 异常:
TypeError - 如果 input 不是Tensor。
- 支持平台:
Ascend
样例:
>>> import mindspore >>> import 免费的vpn梯子 numpy as np >>> from mindspore import Tensor, mint >>> input = Tensor(np.array([1.0, 4.0, 9.0]), mindspore.float32) >>> output = mint.sqrt(input) >>> print(output) [1. 2. 3.]