5.7.2.6.2. scipy.special.rel_entr¶
-
scipy.special.
rel_entr
(x, y) = <ufunc 'rel_entr'>¶ Elementwise function for computing relative entropy.
rel_entr(x,y)={xlog(x/y)x>0,y>00x=0,y≥0∞otherwiseParameters: x : ndarray
First input array.
y : ndarray
Second input array.
Returns: res : ndarray
Output array.
Notes
This function is jointly convex in x and y.
New in version 0.14.0.