degrees

Contents

degrees#

class brainunit.math.degrees(x, unit_to_scale=None, **kwargs)#

Convert angles from radians to degrees (alias for rad2deg()).

Parameters:
  • x (Array | ndarray | bool | number | bool | int | float | complex | saiunit.Quantity) – Angle in radians.

  • unit_to_scale (saiunit.Unit | None) – Unit used to convert x to a dimensionless number first.

Returns:

out – Angle in degrees.

Return type:

Array

Examples

>>> import saiunit as u
>>> import jax.numpy as jnp
>>> u.math.degrees(jnp.array([0.0, jnp.pi]))
Array([  0., 180.], dtype=float32)