[Numpy-discussion] New ufuncs

Charles R Harris charlesr.harris at gmail.com
Thu Nov 6 17:36:25 EST 2008


On Thu, Nov 6, 2008 at 3:17 PM, T J <tjhnson at gmail.com> wrote:

> 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).
>

I could add exp2, log2, and logaddexp2 pretty easily. Almost too easily, I
don't want to clutter up numpy with a lot of functions. However, if there is
a community for these functions I will put them in.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20081106/d8096bac/attachment.html>


More information about the NumPy-Discussion mailing list