Re: [Numpy-discussion] idea of optimisation?

2011-12-07 Thread Xavier Barthelemy
Actually this can be a good idea. i didn't thought using he sorting. i'll try thanks for yours ideas Xavier 2011/12/7 Tony Yu > > > On Tue, Dec 6, 2011 at 2:51 AM, Xavier Barthelemy wrote: > >> ok let me be more precise >> >> I have an Z array which is the elevation >> from this I extract a dis

Re: [Numpy-discussion] idea of optimisation?

2011-12-06 Thread Tony Yu
On Tue, Dec 6, 2011 at 2:51 AM, Xavier Barthelemy wrote: > ok let me be more precise > > I have an Z array which is the elevation > from this I extract a discrete array of Zero Crossing, and another > discrete array of Crests. > len(crest) is different than len(Xzeros). I have a threshold method

Re: [Numpy-discussion] idea of optimisation?

2011-12-06 Thread Xavier Barthelemy
Yes I understood what you said. I know these tools, and I am using them. I was just wandering if someone has a more one-liner-pythonic way to do it. I don't think it's worth importing a new fortran module. Thanks anyway :) Xavier 2011/12/6 David Froger > Excerpts from Xavier Barthelemy's message

Re: [Numpy-discussion] idea of optimisation?

2011-12-06 Thread David Froger
Excerpts from Xavier Barthelemy's message of mar. déc. 06 08:51:22 +0100 2011: > ok let me be more precise > > I have an Z array which is the elevation > from this I extract a discrete array of Zero Crossing, and another discrete > array of Crests. > len(crest) is different than len(Xzeros). I hav

Re: [Numpy-discussion] idea of optimisation?

2011-12-05 Thread Xavier Barthelemy
ok let me be more precise I have an Z array which is the elevation from this I extract a discrete array of Zero Crossing, and another discrete array of Crests. len(crest) is different than len(Xzeros). I have a threshold method to detect my "valid" crests, and sometimes there are 2 crests between

Re: [Numpy-discussion] idea of optimisation?

2011-12-05 Thread David Froger
Excerpts from Xavier Barthelemy's message of mar. déc. 06 06:53:09 +0100 2011: > Hi everyone > > I was wondering if there is a more optimal way to write what follows: > I am studying waves, so I have an array of wave crests positions, Xcrest > and the positions of the ZeroCrossings, Xzeros. > > T

[Numpy-discussion] idea of optimisation?

2011-12-05 Thread Xavier Barthelemy
Hi everyone I was wondering if there is a more optimal way to write what follows: I am studying waves, so I have an array of wave crests positions, Xcrest and the positions of the ZeroCrossings, Xzeros. The goal is to find between which Xzeros my xcrest are. XXX1=XCrest CrestZerosNeighbour=np.z