jax.numpy.rad2deg#
- jax.numpy.rad2deg(x, /)[source]#
Convert angles from radians to degrees.
JAX implementation of
numpy.rad2deg
.The angle in radians is converted to degrees by:
\[rad2deg(x) = x * \frac{180}{pi}\]- Parameters:
x (ArrayLike) – scalar or array. Specifies the angle in radians.
- Returns:
An array containing the angles in degrees.
- Return type:
See also
jax.numpy.deg2rad()
andjax.numpy.radians()
: Converts the angles from degrees to radians.jax.numpy.degrees()
: Alias ofrad2deg
.
Examples
>>> pi = jnp.pi >>> x = jnp.array([pi/4, pi/2, 2*pi/3]) >>> jnp.rad2deg(x) Array([ 45. , 90. , 120.00001], dtype=float32) >>> x * 180 / pi Array([ 45., 90., 120.], dtype=float32)