jax.numpy.log2
Contents
jax.numpy.log2#
- jax.numpy.log2(x,/)[source]#
Calculates the base-2 logarithm of
xelement-wise.JAX implementation of
numpy.log2.- Parameters:
x (ArrayLike) – Input array
- Returns:
An array containing the base-2 logarithm of each element in
x, promotesto inexact dtype.- Return type:
Examples
>>>x1=jnp.array([0.25,0.5,1,2,4,8])>>>jnp.log2(x1)Array([-2., -1., 0., 1., 2., 3.], dtype=float32)
Contents
