tf.keras.ops.arccos

Trigonometric inverse cosine, element-wise.

The inverse of cos so that, if y = cos(x), then x = arccos(y).

x Input tensor.

Tensor of the angle of the ray intersecting the unit circle at the given x-coordinate in radians [0, pi].

Example:

x = keras.ops.convert_to_tensor([1, -1])
keras.ops.arccos(x)
array([0.0, 3.1415927], dtype=float32)