scipy/scipy — pull request #3981 by argriffing (2014-09-10 05:03:58+00:00)
Title: turn the cryptically named scipy.special information theory functions into ufuncs

These ufuncs try to be careful about corner cases, and none of them can be directly replaced by existing ufuncs functions like xlogy. The `entr(x)` ufunc is very similar to `-xlogy(x,x)`, but it has different behavior at negative x. The other two ufuncs are convex on all (x, y) whereas their earlier implementations that were clever enough to handle the limit at the origin still returned nan for some x,y points.

These functions are intended to have the same definitions as the functions of the same name in "disciplined convex programming" (http://stanford.edu/~boyd/papers/disc_cvx_prog.html) projects like `cvx` and `cvxpy` (note that these are different from `cvxopt`). The hope is that because these functions are so carefully defined, they can simplify some of the corner case headaches in higher level scipy functions related to statistics and divergences.