Re: [Numpy-discussion] Quick question on NumPy builds vs. Cython

2009-08-25 Thread David Cournapeau
On Tue, Aug 25, 2009 at 9:44 PM, Charles R Harris wrote: > > > On Tue, Aug 25, 2009 at 11:30 AM, David Cournapeau > wrote: >> >> Hi Dag, >> >> On Tue, Aug 25, 2009 at 12:19 PM, Dag Sverre >> Seljebotn wrote: >> > [Let me know if this should go to numpy-discuss instead.] >> > >> >> I guess this can

Re: [Numpy-discussion] mirr test correctly fails for given input.

2009-08-25 Thread josef . pktd
On Tue, Aug 25, 2009 at 11:38 PM, Charles R Harris wrote: > So is it a bug in the test or a bug in the implementation? The problem is > that the slice values[1:] when > values =  [-12,39000,3,21000,37000,46000] contains no negative > number and a nan is returned. This looks like a bug in th

[Numpy-discussion] mirr test correctly fails for given input.

2009-08-25 Thread Charles R Harris
So is it a bug in the test or a bug in the implementation? The problem is that the slice values[1:] when values = [-12,39000,3,21000,37000,46000] contains no negative number and a nan is returned. This looks like a bug in the test. The documentation also probably needs fixing. Chuck _

Re: [Numpy-discussion] Quick question on NumPy builds vs. Cython

2009-08-25 Thread Charles R Harris
On Tue, Aug 25, 2009 at 11:30 AM, David Cournapeau wrote: > Hi Dag, > > On Tue, Aug 25, 2009 at 12:19 PM, Dag Sverre > Seljebotn wrote: > > [Let me know if this should go to numpy-discuss instead.] > > > > I guess this can be discussed on the ML as well (I CC to the list). > > > > > I see that the

Re: [Numpy-discussion] filters for rows or columns

2009-08-25 Thread Robert Kern
On Tue, Aug 25, 2009 at 16:18, Giuseppe Aprea wrote: > Hi,  I would like to do something like this > > a=array([[1,2,3,4],[5,6,7,8],[4,5,6,0]]) > idxList=[] > for i in range(0,a.shape[1]): >    if len(nonzero(a[:,i])[0])==1:   #want to extract column indices > of those columns which only have one n

Re: [Numpy-discussion] filters for rows or columns

2009-08-25 Thread Giuseppe Aprea
On Tue, Aug 25, 2009 at 8:13 PM, Robert Kern wrote: > On Tue, Aug 25, 2009 at 11:07, Giuseppe Aprea wrote: >> Hi list, >> >> >> I wonder if there is any smarter way to apply a filter to a 2 dimensional >> array >> than a for loop: >> >> a=array(...) >> idxList=[] >> for i in range(0,a.shape[1]

Re: [Numpy-discussion] A better median function?

2009-08-25 Thread Sturla Molden
Chad Netzer skrev: > My current plan of attack is to deliver a partition() function that > basically returns an array such that elements less than the pivot(s) > come first, then the pivot(s), then the elements greater than the > pivot(s). I'm actually trying to write a fast median replacement m

Re: [Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Charles R Harris
On Tue, Aug 25, 2009 at 1:05 PM, Pierre GM wrote: > > On Aug 25, 2009, at 1:59 PM, Skipper Seabold wrote: > > > On Tue, Aug 25, 2009 at 1:51 PM, Charles R > > Harris wrote: > >> Hi Travis, > >> > >> The new parse_datetime.c file contains a lot of c++ style comments > >> that > >> should be fixed.

Re: [Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Pierre GM
On Aug 25, 2009, at 1:59 PM, Skipper Seabold wrote: > On Tue, Aug 25, 2009 at 1:51 PM, Charles R > Harris wrote: >> Hi Travis, >> >> The new parse_datetime.c file contains a lot of c++ style comments >> that >> should be fixed. Also, the new test for mirr is failing on all the >> buildbots. Co

Re: [Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Charles R Harris
On Tue, Aug 25, 2009 at 11:51 AM, Charles R Harris < charlesr.har...@gmail.com> wrote: > Hi Travis, > > The new parse_datetime.c file contains a lot of c++ style comments that > should be fixed. Also, the new test for mirr is failing on all the > buildbots. > Also, 1) There are two macros with g

Re: [Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Skipper Seabold
On Tue, Aug 25, 2009 at 1:51 PM, Charles R Harris wrote: > Hi Travis, > > The new parse_datetime.c file contains a lot of c++ style comments that > should be fixed. Also, the new test for mirr is failing on all the > buildbots. > > Chuck > Hi, For mirr it looks like the lines in the patch

Re: [Numpy-discussion] filters for rows or columns

2009-08-25 Thread Robert Kern
On Tue, Aug 25, 2009 at 11:07, Giuseppe Aprea wrote: > Hi list, > > > I wonder if there is any smarter way to apply a filter to a 2 dimensional > array > than a for loop: > > a=array(...) > idxList=[] > for i in range(0,a.shape[1]): >       if (some condition on a[:,i]): >             idxList.

[Numpy-discussion] filters for rows or columns

2009-08-25 Thread Giuseppe Aprea
Hi list, I wonder if there is any smarter way to apply a filter to a 2 dimensional array than a for loop: a=array(...) idxList=[] for i in range(0,a.shape[1]): if (some condition on a[:,i]): idxList.append(i) thanks in advance. g ___

Re: [Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Skipper Seabold
On Tue, Aug 25, 2009 at 1:59 PM, Skipper Seabold wrote: > On Tue, Aug 25, 2009 at 1:51 PM, Charles R > Harris wrote: >> Hi Travis, >> >> The new parse_datetime.c file contains a lot of c++ style comments that >> should be fixed. Also, the new test for mirr is failing on all the >> buildbots. >> >>

[Numpy-discussion] c++ comments in parse_datetime.c

2009-08-25 Thread Charles R Harris
Hi Travis, The new parse_datetime.c file contains a lot of c++ style comments that should be fixed. Also, the new test for mirr is failing on all the buildbots. Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mai

Re: [Numpy-discussion] Quick question on NumPy builds vs. Cython

2009-08-25 Thread David Cournapeau
Hi Dag, On Tue, Aug 25, 2009 at 12:19 PM, Dag Sverre Seljebotn wrote: > [Let me know if this should go to numpy-discuss instead.] > I guess this can be discussed on the ML as well (I CC to the list). > > I see that there are currently two modes, and that it is possible to build > NumPy using a m