scipy/scipy — pull request #3382 by argriffing (2014-02-24 22:26:56+00:00)
Title: ENH: scipy.special information theory functions

Add three information theory functions to scipy.special. These are atoms in cvxpy, they simplify some scipy.stats code, and presumably they would be useful for sklearn. The function names are abbreviated in accordance with scipy.special naming convention and with the corresponding cvx and cvxpy atom names, and to reduce the possibility of confusion with functions like `entropy` and `kl_divergence` which are reductions (sum-along-axis) of these functions.

The pure python implementation handles `0` correctly, and perhaps the functions could eventually be replaced with cython implementations that also handle `inf` and negative inputs in a way that respects limits and preserves convexity.