mindspore.numpy.arccos
- mindspore.numpy.arccos(input, dtype=None)[源代码]
- 逐元素计算反余弦函数。 - 说明 - 不支持Numpy的 - out、- where、- casting、- order、- subok、- signature和- extobj参数。- 参数:
- input (Tensor) - 输入Tensor,表示单位圆上的x坐标。对于实数输入,定义域为 \([-1, 1]\) 。 
- dtype (mindspore.dtype, 可选) - 默认值: - None。覆盖输出Tensor的dtype。
 
- 返回:
- Tensor。 
- 异常:
- TypeError - 如果输入不是Tensor。 
 
- 支持平台:
- Ascend- GPU- CPU
 - 样例: - >>> import mindspore.numpy as np >>> input = np.asarray([1, -1], np.float32) >>> output = np.arccos(input) >>> print(output) [0. 3.1415927]