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.exp2.html below:

jax.numpy.exp2 — JAX documentation

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

Calculate element-wise base-2 exponential of input.

JAX implementation of numpy.exp2.

Parameters:

x (ArrayLike) – input array or scalar

Returns:

An array containing the base-2 exponential of each element in x, promotes to inexact dtype.

Return type:

Array

Examples

jnp.exp2 follows the properties of the exponential such as \(2^{a+b} = 2^a * 2^b\).

>>> x1 = jnp.array([2, -4, 3, -1])
>>> x2 = jnp.array([-1, 3, -2, 3])
>>> jnp.exp2(x1+x2)
Array([2. , 0.5, 2. , 4. ], dtype=float32)
>>> jnp.exp2(x1)*jnp.exp2(x2)
Array([2. , 0.5, 2. , 4. ], dtype=float32)

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