jax.scipy.special.entr

Contents

jax.scipy.special.entr#

jax.scipy.special.entr(x)[source]#

Elementwise function for computing entropy.

LAX-backend implementation of scipy.special.entr().

Original docstring below.

\[\begin{split}\text{entr}(x) = \begin{cases} - x \log(x) & x > 0 \\ 0 & x = 0 \\ -\infty & \text{otherwise} \end{cases}\end{split}\]
Parameters:

x (ndarray) – Input array.

Returns:

res – The value of the elementwise entropy function at the given points x.

Return type:

scalar or ndarray

References