mindspore.ops.coo_acos

mindspore.ops.coo_acos(x: COOTensor)[源代码]

逐元素计算输入COOTensor的反余弦。

\[out_i = cos^{-1}(x_i)\]
参数:
  • x (COOTensor) - 输入COOTensor。

返回:

COOTensor,shape和数据类型与 x 相同。

异常:
  • TypeError - 如果 x 不是COOTensor。

  • TypeError - 如果 x 的数据类型不是float16、float32或float64。

支持平台:

Ascend GPU CPU

样例:

>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
>>> values = Tensor([-1, 2], dtype=mstype.float32)
>>> shape = (3, 4)
>>> x = COOTensor(indices, values, shape)
>>> output = ops.coo_acos(x)
>>> print(output.values)
[3.1415927       nan]