acos

Contents

acos#

class brainunit.lax.acos(x, unit_to_scale=None, **kwargs)#

Elementwise arc cosine: \(\mathrm{acos}(x)\).

Parameters:
  • x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array. Must be dimensionless or scaled to dimensionless via unit_to_scale.

  • unit_to_scale (saiunit.Unit | None) – If provided, x is scaled by this unit before applying the function.

Returns:

result – The arc cosine of x. Always unitless.

Return type:

Array

Examples

>>> import saiunit as u
>>> import saiunit.lax as sulax
>>> import jax.numpy as jnp
>>> sulax.acos(jnp.array([0.0, 0.5, 1.0]))
Array([1.5707964 , 1.0471976 , 0.        ], dtype=float32)