Re: [Numpy-discussion] Floating exception

2010-01-20 Thread David Cournapeau
Nils Wagner wrote: > Hi all, > > I found a strange problem when I try to import numpy > > python -v import numpy > ... > dlopen("/data/home/nwagner/local/lib/python2.5/site-packages/numpy/core/multiarray.so", > > 2); > Floating exception > > Any idea ? Could you get a traceback (ideall

Re: [Numpy-discussion] strange divergence in performance

2010-01-20 Thread Ernest Adrogué
20/01/10 @ 16:17 (-0600), thus spake Robert Kern: > 2010/1/20 Ernest Adrogué : > > Hi, > > > > I have a function where an array of integers (1-d) is compared > > element-wise to an integer using the greater-than operator. > > I noticed that when the integer is 0 it takes about 75% more time > > tha

Re: [Numpy-discussion] numpy.test(): invalid value encountered in {isinf, divide, power, ...}

2010-01-20 Thread Pierre GM
On Jan 20, 2010, at 4:57 PM, Darren Dale wrote: > I haven't been following development on the trunk closely, so I > apologize if this is a known issue. I didn't see anything relevant > when I searched the list. > > I just updated my checkout of the trunk, cleaned out the old > installation and bui

Re: [Numpy-discussion] strange divergence in performance

2010-01-20 Thread Robert Kern
2010/1/20 Ernest Adrogué : > Hi, > > I have a function where an array of integers (1-d) is compared > element-wise to an integer using the greater-than operator. > I noticed that when the integer is 0 it takes about 75% more time > than when it's 1 or 2. Is there an explanation? > > Here is a strip

[Numpy-discussion] numpy.test(): invalid value encountered in {isinf, divide, power, ...}

2010-01-20 Thread Darren Dale
I haven't been following development on the trunk closely, so I apologize if this is a known issue. I didn't see anything relevant when I searched the list. I just updated my checkout of the trunk, cleaned out the old installation and build/, and reinstalled. When I run the test suite (without spe

[Numpy-discussion] strange divergence in performance

2010-01-20 Thread Ernest Adrogué
Hi, I have a function where an array of integers (1-d) is compared element-wise to an integer using the greater-than operator. I noticed that when the integer is 0 it takes about 75% more time than when it's 1 or 2. Is there an explanation? Here is a stripped-down version which does (sort of)sho

Re: [Numpy-discussion] dates, np.where finding months

2010-01-20 Thread John [H2O]
Keith Goodman wrote: > > > > Or maybe this is cleaner: > >>> [date.month==1 for date in A[:,0]] >[True, True, False, True] > > which can be used like this: > >>> idx = np.array([date.month==1 for date in A[:,0]]) >>> A[idx,:] > > array([[2010-01-01, 1], >[2010-01-02, 2], >

[Numpy-discussion] Floating exception

2010-01-20 Thread Nils Wagner
Hi all, I found a strange problem when I try to import numpy python -v >>> import numpy ... dlopen("/data/home/nwagner/local/lib/python2.5/site-packages/numpy/core/multiarray.so", 2); Floating exception Any idea ? Nils ___ NumPy-Discussion mailing

Re: [Numpy-discussion] dates, np.where finding months

2010-01-20 Thread Keith Goodman
On Wed, Jan 20, 2010 at 7:21 AM, Keith Goodman wrote: > On Wed, Jan 20, 2010 at 7:11 AM, Keith Goodman wrote: >> On Wed, Jan 20, 2010 at 6:01 AM, John [H2O] wrote: >>> >>> I have an array with the leading column a series of datetime objects. It >>> covers several years. What is the most efficien

Re: [Numpy-discussion] dates, np.where finding months

2010-01-20 Thread Keith Goodman
On Wed, Jan 20, 2010 at 7:11 AM, Keith Goodman wrote: > On Wed, Jan 20, 2010 at 6:01 AM, John [H2O] wrote: >> >> I have an array with the leading column a series of datetime objects. It >> covers several years. What is the most efficient way to pull out all the >> 'January' dates? >> >> Right now

Re: [Numpy-discussion] dates, np.where finding months

2010-01-20 Thread Keith Goodman
On Wed, Jan 20, 2010 at 6:01 AM, John [H2O] wrote: > > I have an array with the leading column a series of datetime objects. It > covers several years. What is the most efficient way to pull out all the > 'January' dates? > > Right now I do this: > > A = array with column 0 datetime objects > > Ja

[Numpy-discussion] dates, np.where finding months

2010-01-20 Thread John [H2O]
I have an array with the leading column a series of datetime objects. It covers several years. What is the most efficient way to pull out all the 'January' dates? Right now I do this: A = array with column 0 datetime objects January = [i for i in A if i[0].month ==1 ] It works, but I would ra