mindspore.numpy.arctan
- mindspore.numpy.arctan(x, dtype=None)[源代码]
逐元素计算反正切函数。 这是正切函数的反函数,如果 \(y=tan(x)\) ,则 \(x=arctan(y)\) 。
说明
不支持Numpy的
out、where、casting、order、subok、signature和extobj参数。- 参数:
x (Tensor) - 输入Tensor。
dtype (mindspore.dtype, 可选) - 默认值:
None。覆盖输出Tensor的dtype。
- 返回:
Tensor或标量。如果
x是标量,则返回结果为标量。- 支持平台:
AscendGPUCPU
样例:
>>> import mindspore.numpy as np >>> x = np.arange(5).astype('float32') >>> print(np.arctan(x)) [0. 0.7853982 1.1071488 1.2490457 1.3258177]