[SciPy-User] Scipy and information theory
Iyán Méndez Veiga
me at iyanmv.com
Thu Nov 7 07:11:55 EST 2019
Hi,
I discovered recently some interesting functions in scipy that are useful in
the context of information theory. In particular, xlogy, entr and rel_entr.
However, for the calculations I want to do I am interested in using log2
instead of natural logarithm. I was expecting to be able to choose the base
with this functions but it is not possible.
Do you think it would be a nice feature to add to scipy? Maybe not for a
general base, but at least the bases that are available in numpy (log2,
log10).
The workaround I am using with xlogy(x,y) (and similar functions) is
multiplying x array by log2(e).
Best wishes,
Iyán
More information about the SciPy-User
mailing list