mindspore.ops.coo_acosh

mindspore.ops.coo_acosh(x: COOTensor)[source]

Computes inverse hyperbolic cosine of the inputs element-wise.

\[y_i = \cosh^{-1}(x_i)\]

Warning

Given an input COOTensor x, the function computes inverse hyperbolic cosine of every element. Input range is [1, inf].

Parameters

x (COOTensor) – The input COOTensor of inverse hyperbolic cosine function.

Returns

COOTensor, has the same shape and type as x.

Raises

TypeError – If x is not a COOTensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> from mindspore import dtype as mstype
>>> from mindspore import Tensor, ops, COOTensor
>>> 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_acosh(x)
>>> print(output.values)
[     nan 1.316958]