atan2

Contents

atan2#

class saiunit.lax.atan2(x, y, unit_to_scale=None, **kwargs)#

Elementwise arc tangent of two variables: \(\mathrm{atan}({x \over y})\).

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

  • y (Array | ndarray | bool | number | bool | int | float | complex | saiunit.Quantity) – Second operand. Must be dimensionless or scaled via unit_to_scale.

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

Returns:

result – Always unitless.

Return type:

Array

Examples

>>> import saiunit.lax as sulax
>>> import jax.numpy as jnp
>>> sulax.atan2(jnp.array([1.0]), jnp.array([1.0]))
Array([0.7853982], dtype=float32)