[Numpy-discussion] New ufuncs

T J tjhnson at gmail.com
Thu Nov 6 17:17:37 EST 2008


On Thu, Nov 6, 2008 at 1:48 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
> What is your particular interest in these other bases and why would
> they be better than working in base e and converting at the end?

The interest is in information theory, where quantities are
(standardly) represented in bits.  So log2 quantities are often stored
by the user and then passed into functions or classes.  The main
reason I'd like to shy away from conversions is that I also make use
of generators/iterators and having next() convert to bits before each
yield is not ideal (as these things are often slow enough and will be
called many times).

>The only one I could see really having a fast implementation is log2.

No disagreement here :)



More information about the NumPy-Discussion mailing list