mindspore.ops.Cosh

class mindspore.ops.Cosh[source]

Computes hyperbolic cosine of input element-wise.

Refer to mindspore.ops.cosh() for more details.

Inputs:
  • x (Tensor) - The shape of tensor is \((N,*)\) where \(*\) means, any number of additional dimensions.

Outputs:

Tensor, has the same shape and dtype as x.

Supported Platforms:

Ascend GPU CPU

Examples

>>> cosh = ops.Cosh()
>>> x = Tensor(np.array([0.24, 0.83, 0.31, 0.09]), mindspore.float32)
>>> output = cosh(x)
>>> print(output)
[1.0289385 1.364684 1.048436 1.0040528]