Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Han Genuit
There is also: Missing/accumulating data http://mail.scipy.org/pipermail/numpy-discussion/2011-July/057406.html An NA compromise idea -- many-NA http://mail.scipy.org/pipermail/numpy-discussion/2011-July/057408.html NEPaNEP lessons - was: alterNEP http://mail.scipy.org/pipermail/numpy-discussion

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Eric Firing
On 10/25/2011 04:56 PM, Travis Oliphant wrote: > So, I am very interested in making sure I remember the details of the > counterproposal.What I recall is that you wanted to be able to > differentiate between a "bit-pattern" mask and a boolean-array mask > in the API. I believe currently even

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Travis Oliphant
So, I am very interested in making sure I remember the details of the counterproposal.What I recall is that you wanted to be able to differentiate between a "bit-pattern" mask and a boolean-array mask in the API. I believe currently even when bit-pattern masks are implemented the differen

Re: [Numpy-discussion] skip lines at the end of file with loadtxt

2011-10-25 Thread Massimo Di Stefano
Many thanks Oliver! i missed it in the description, works great :-) --Massimo. Il giorno 25/ott/2011, alle ore 15.33, Olivier Delalleau ha scritto: > Maybe try genfromtxt instead of loadtxt, it has a skip_footer option. > > -=- Olivier > > 2011/10/25 Massimo Di Stefano > i'm tring to genera

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Matthew Brett
Hi, Thank you for your gracious email. On Tue, Oct 25, 2011 at 2:56 PM, Travis Oliphant wrote: > It is a shame that Nathaniel and perhaps Matthew do not feel like their > voice was heard.   I wish I could have participated more fully in some of > the discussions.  I don't know if I could have re

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 2:58 PM, David Cournapeau wrote: > On Tue, Oct 25, 2011 at 8:22 PM, Matthew Brett > wrote: >> Hi, >> >> On Tue, Oct 25, 2011 at 12:14 PM, Pauli Virtanen wrote: >>> 25.10.2011 20:29, Matthew Brett kirjoitti: >>> [clip] In [7]: (res-1) / 2**32 Out[7]: 858993

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread David Cournapeau
On Tue, Oct 25, 2011 at 8:22 PM, Matthew Brett wrote: > Hi, > > On Tue, Oct 25, 2011 at 12:14 PM, Pauli Virtanen wrote: >> 25.10.2011 20:29, Matthew Brett kirjoitti: >> [clip] >>> In [7]: (res-1) / 2**32 >>> Out[7]: 8589934591.98 >>> >>> In [8]: np.float((res-1) / 2**32) >>> Out[8]: 42949

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Travis Oliphant
It is a shame that Nathaniel and perhaps Matthew do not feel like their voice was heard. I wish I could have participated more fully in some of the discussions. I don't know if I could have really helped, but I would have liked to have tried to perhaps work alongside Mark to integrate some of

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Lluís
Matthew Brett writes: [...] >>> If we do value constructive disagreement then we'll go out of our way >>> to talk through the points of contention, and make sure that the >>> people who disagree, especially the minority, feel that they have been >>> fully heard. >>> >>> If we don't value construct

Re: [Numpy-discussion] skip lines at the end of file with loadtxt

2011-10-25 Thread Olivier Delalleau
Maybe try genfromtxt instead of loadtxt, it has a skip_footer option. -=- Olivier 2011/10/25 Massimo Di Stefano > i'm tring to generate an array reading a txt file from internet. > > my target is to use python instead of matlab, to replace this steps in > matlab : > > url=['http://www.cdc.noaa.

[Numpy-discussion] skip lines at the end of file with loadtxt

2011-10-25 Thread Massimo Di Stefano
i'm tring to generate an array reading a txt file from internet. my target is to use python instead of matlab, to replace this steps in matlab : url=['http://www.cdc.noaa.gov/Correlation/amon.us.long.data']; urlwrite(url,'file.txt'); i'm using this code : urllib.urlretrieve('http://www.cdc.noaa

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 12:14 PM, Pauli Virtanen wrote: > 25.10.2011 20:29, Matthew Brett kirjoitti: > [clip] >> In [7]: (res-1) / 2**32 >> Out[7]: 8589934591.98 >> >> In [8]: np.float((res-1) / 2**32) >> Out[8]: 4294967296.0 > > Looks like a bug in the C library installed on the mach

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Derek Homeier
Hi, On 25 Oct 2011, at 21:14, Pauli Virtanen wrote: > 25.10.2011 20:29, Matthew Brett kirjoitti: > [clip] >> In [7]: (res-1) / 2**32 >> Out[7]: 8589934591.98 >> >> In [8]: np.float((res-1) / 2**32) >> Out[8]: 4294967296.0 > > Looks like a bug in the C library installed on the machine, t

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Pauli Virtanen
25.10.2011 20:29, Matthew Brett kirjoitti: [clip] > In [7]: (res-1) / 2**32 > Out[7]: 8589934591.98 > > In [8]: np.float((res-1) / 2**32) > Out[8]: 4294967296.0 Looks like a bug in the C library installed on the machine, then. It's either in wontfix territory for us, or in the "cast to do

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 12:01 PM, Derek Homeier wrote: > On 25 Oct 2011, at 20:05, Matthew Brett wrote: > Both the same as numpy: [mb312@jerry ~]$ gcc test.c test.c: In function 'main': test.c:5: warning: incompatible implicit declaration of built-in function 'po

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 11:24 AM, Benjamin Root wrote: > On Tue, Oct 25, 2011 at 1:03 PM, Matthew Brett > wrote: >> >> Hi, >> >> On Tue, Oct 25, 2011 at 8:04 AM, Lluís wrote: >> > Matthew Brett writes: >> >> I'm afraid I find this whole thread very unpleasant. >> > >> >> I have the odd impr

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Derek Homeier
On 25 Oct 2011, at 20:05, Matthew Brett wrote: >>> Both the same as numpy: >>> >>> [mb312@jerry ~]$ gcc test.c >>> test.c: In function 'main': >>> test.c:5: warning: incompatible implicit declaration of built-in function >>> 'powl' >> >> I think implicit here means that that the arguments and th

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 11:14 AM, Pauli Virtanen wrote: > 25.10.2011 19:45, Matthew Brett kirjoitti: > [clip] >>> or, in case the platform doesn't have powl: >>> >>>         long double x; >>>         x = pow(2, 64); >>>         x -= 1; >>>         printf("%g %Lg\n", (double)x, x); >> >> Both

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Benjamin Root
On Tue, Oct 25, 2011 at 1:03 PM, Matthew Brett wrote: > Hi, > > On Tue, Oct 25, 2011 at 8:04 AM, Lluís wrote: > > Matthew Brett writes: > >> I'm afraid I find this whole thread very unpleasant. > > > >> I have the odd impression of being back at high school. Some of the > >> big kids are pushing

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Pauli Virtanen
25.10.2011 19:45, Matthew Brett kirjoitti: [clip] >> or, in case the platform doesn't have powl: >> >> long double x; >> x = pow(2, 64); >> x -= 1; >> printf("%g %Lg\n", (double)x, x); > > Both the same as numpy: > > [mb312@jerry ~]$ gcc test.c > test.c: In function

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
On Tue, Oct 25, 2011 at 11:05 AM, Matthew Brett wrote: > Hi, > > On Tue, Oct 25, 2011 at 10:52 AM, Charles R Harris > wrote: >> >> >> On Tue, Oct 25, 2011 at 11:45 AM, Matthew Brett >> wrote: >>> >>> Hi, >>> >>> On Tue, Oct 25, 2011 at 2:43 AM, Pauli Virtanen wrote: >>> > 25.10.2011 06:59, Matt

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 10:52 AM, Charles R Harris wrote: > > > On Tue, Oct 25, 2011 at 11:45 AM, Matthew Brett > wrote: >> >> Hi, >> >> On Tue, Oct 25, 2011 at 2:43 AM, Pauli Virtanen wrote: >> > 25.10.2011 06:59, Matthew Brett kirjoitti: >> >> res = np.longdouble(2)**64 >> >> res-1 >> >>

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 8:04 AM, Lluís wrote: > Matthew Brett writes: >> I'm afraid I find this whole thread very unpleasant. > >> I have the odd impression of being back at high school.  Some of the >> big kids are pushing me around and then the other kids join in. > >> It didn't have to be

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Charles R Harris
On Tue, Oct 25, 2011 at 11:45 AM, Matthew Brett wrote: > Hi, > > On Tue, Oct 25, 2011 at 2:43 AM, Pauli Virtanen wrote: > > 25.10.2011 06:59, Matthew Brett kirjoitti: > >> res = np.longdouble(2)**64 > >> res-1 > >> 36893488147419103231.0 > > > > Can you check if long double works properly (not a

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 2:43 AM, Pauli Virtanen wrote: > 25.10.2011 06:59, Matthew Brett kirjoitti: >> res = np.longdouble(2)**64 >> res-1 >> 36893488147419103231.0 > > Can you check if long double works properly (not a given) in C on that > platform: > >        long double x; >        x = po

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Matthew Brett
Hi, On Tue, Oct 25, 2011 at 7:31 AM, Charles R Harris wrote: > > > On Mon, Oct 24, 2011 at 10:59 PM, Matthew Brett > wrote: >> >> Hi, >> >> I just ran into this on a PPC machine: >> >> In [1]: import numpy as np >> >> In [2]: np.__version__ >> Out[2]: '2.0.0.dev-4daf949' >> >> In [3]: res = np.l

Re: [Numpy-discussion] numpy.matrix subclassing

2011-10-25 Thread Aronne Merrelli
On Mon, Oct 24, 2011 at 5:54 PM, David Voong wrote: > Hi guys, > > I have a question regarding subclassing of the numpy.matrix class. > > I read through the wiki page, > http://docs.scipy.org/doc/numpy/user/basics.subclassing.html > > and tried to subclass numpy.matrix, I find that if I override

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Lluís
Matthew Brett writes: > I'm afraid I find this whole thread very unpleasant. > I have the odd impression of being back at high school. Some of the > big kids are pushing me around and then the other kids join in. > It didn't have to be this way. > Someone could have replied like this to Nathani

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Charles R Harris
On Mon, Oct 24, 2011 at 10:59 PM, Matthew Brett wrote: > Hi, > > I just ran into this on a PPC machine: > > In [1]: import numpy as np > > In [2]: np.__version__ > Out[2]: '2.0.0.dev-4daf949' > > In [3]: res = np.longdouble(2)**64 > > In [4]: res > Out[4]: 18446744073709551616.0 > > In [5]: 2**64

Re: [Numpy-discussion] neighborhood iterator speed

2011-10-25 Thread Nadav Horesh
Finally managed to use PyArrayNeighborhoodIter_Next2D with numpy 1.5.0 (in numpy 1.6 it doesn't get along with halffloat). Benchmark results (not the same computer and parameters I used in the previous benchmark): 1. ...Next2D (zero padding, it doesn't accept mirror padding): 10 sec 2. ...Next (z

Re: [Numpy-discussion] float128 / longdouble on PPC - is it broken?

2011-10-25 Thread Pauli Virtanen
25.10.2011 06:59, Matthew Brett kirjoitti: > res = np.longdouble(2)**64 > res-1 > 36893488147419103231.0 Can you check if long double works properly (not a given) in C on that platform: long double x; x = powl(2, 64); x -= 1; printf("%g %Lg\n", (double)x, x); or,

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Matthew Brett
Hi, On Mon, Oct 24, 2011 at 11:44 PM, Han Genuit wrote: > Well, if I may have a say, I think that an open source project is > especially open when users as developers can contribute to the code > base and can participate in discussions on how to improve the existing > designs and ideas. I do not