logo       

Re: Bool array missing sum function.: msg#00053

python.numeric.general

Subject: Re: Bool array missing sum function.

I logged this as a bug on Source Forge and I'll look into it.

Todd

On Wed, 2004-08-18 at 07:32, Nadav Horesh wrote:
> Why Bool arrays are missing the sum method?
>
> >>> b = array((1,0,1), type=Bool)
> >>> b
> array([1, 0, 1], type=Bool)
> >>> b.sum()
>
> Traceback (most recent call last):
> File "<pyshell#129>", line 1, in -toplevel-
> b.sum()
> File "/usr/local/lib/python2.4/site-packages/numarray/numarraycore.py",
> line 1125, in sum
> return ufunc.add.reduce(ufunc.add.areduce(self, type=type).flat,
> type=type)
> File "/usr/local/lib/python2.4/site-packages/numarray/ufunc.py", line 1165,
> in _cum_cache_miss
> mode, win1, wout, cfunc, ufargs = \
> File "/usr/local/lib/python2.4/site-packages/numarray/ufunc.py", line 1225,
> in _cum_setup
> otype, cfunc = ufdict[(optype,)]
> KeyError: Bool
>
> Nadav.
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
--



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise