mindspore.numpy.arccos

mindspore.numpy.arccos(input, dtype=None)[源代码]

Trigonometric inverse cosine, element-wise.

说明

Numpy arguments out, where, casting, order, subok, signature, and extobj are not supported.

参数
  • input (Tensor) – Input tensor. x-coordinate on the unit circle. For real arguments, the domain is \([-1, 1]\).

  • dtype (mindspore.dtype, optional) – Default: None. Overrides the dtype of the output Tensor.

返回

Tensor.

异常

TypeError – If the input is not a tensor.

Supported Platforms:

Ascend GPU CPU

样例

>>> import mindspore.numpy as np
>>> input = np.asarray([1, -1], np.float32)
>>> output = np.arccos(input)
>>> print(output)
[0.        3.1415927]