A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.deg2rad.html below:

jax.numpy.deg2rad — JAX documentation

jax.numpy.deg2rad#
jax.numpy.deg2rad(x, /)[source]#

Convert angles from degrees to radians.

JAX implementation of numpy.deg2rad.

The angle in degrees is converted to radians by:

\[deg2rad(x) = x * \frac{pi}{180}\]

Parameters:

x (ArrayLike) – scalar or array. Specifies the angle in degrees.

Returns:

An array containing the angles in radians.

Return type:

Array

Examples

>>> x = jnp.array([60, 90, 120, 180])
>>> jnp.deg2rad(x)
Array([1.0471976, 1.5707964, 2.0943952, 3.1415927], dtype=float32)
>>> x * jnp.pi / 180
Array([1.0471976, 1.5707964, 2.0943952, 3.1415927],      dtype=float32, weak_type=True)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3