[Numpy-discussion] New ufuncs

Charles R Harris charlesr.harris@gmail....
Thu Nov 6 16:36:25 CST 2008


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

> On Thu, Nov 6, 2008 at 1:48 PM, Charles R Harris
> <charlesr.harris@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://projects.scipy.org/pipermail/numpy-discussion/attachments/20081106/d8096bac/attachment.html 


More information about the Numpy-discussion mailing list