5.7.2.6.1. scipy.special.entr

scipy.special.entr(x) = <ufunc 'entr'>

Elementwise function for computing entropy.

entr(x)={xlog(x)x>00x=0otherwise
Parameters:

x : ndarray

Input array.

Returns:

res : ndarray

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

See also

kl_div, rel_entr

Notes

This function is concave.

New in version 0.14.0.