mindspore.Tensor.acosh

查看源文件
mindspore.Tensor.acosh()

逐元素计算 self 的反双曲余弦。

\[out_i = \cosh^{-1}(self_i)\]

说明

输入范围为[1, inf]。

返回:

Tensor,shape与 self 相同。当 self 数据类型为bool、int8、uint8、int16、int32、int64时,返回值数据类型为float32。否则,返回值数据类型与 self 数据类型相同。

异常:
  • TypeError - 如果 self 不是Tensor。

支持平台:

Ascend GPU CPU

样例:

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> x = Tensor(np.array([1.0, 1.5, 3.0, 100.0]), mindspore.float32)
>>> output = Tensor.acosh(x)  # x.acosh()
>>> print(output)
[0.        0.9624236 1.7627472 5.298292 ]