当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python tf.math.asin用法及代码示例


逐元素计算 x 的三角反正弦。

用法

tf.math.asin(
    x, name=None
)

参数

  • x 一个Tensor。必须是以下类型之一:bfloat16 , half , float32 , float64 , int8 , int16 , int32 , int64 , complex64 , complex128
  • name 操作的名称(可选)。

返回

  • 一个Tensor。具有与 x 相同的类型。

tf.math.asin 操作返回 tf.math.sin 的倒数,因此如果 y = tf.math.sin(x) 那么 x = tf.math.asin(y)

注意:tf.math.asin 的输出将位于正弦的可逆范围内,即 [-pi/2, pi/2]。

例如:

# Note:[1.047, 0.785] ~= [(pi/3), (pi/4)]
x = tf.constant([1.047, 0.785])
y = tf.math.sin(x) # [0.8659266, 0.7068252]

tf.math.asin(y) # [1.047, 0.785] = x

相关用法


注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.math.asin。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。