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] What does fftn take as parameters?

2011-12-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/11 14:19, David Cournapeau wrote: > I am not I understand what you are trying to do ? I had a slight misunderstanding with the math guy and had believed that for our purposes we could feed in 16 columns and get one "column" of fft output. How

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

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Matthew Brett
Hi, 2011/12/5 Stéfan van der Walt : > As for barriers to entry, improving the the nature of discourse on the > mailing list (when it comes to thorny issues) would be good. > Technical barriers are not that hard to breach for our community; > setting the right social atmosphere is crucial. I'm jus

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-05 Thread kneil
Hi Nathaniel, Thanks for the suggestion. I more or less implemented it: np.save('X',X); X2=np.load('X.npy') X2=np.asmatrix(X2) diffy = (X != X2) if diffy.any(): print X[diffy] print X2[diffy] print X[diffy][0].view(

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread questions anon
thanks again for you response. I must still be doing something wrong!! both options resulted in : the TSFC_avg is: [-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread Xavier Barthelemy
Well, I would see solutions: 1- to keep how your code is, withj a python list (you can stack numpy arrays if they have the same dimensions): for filename in netCDF_list: ncfile=netCDF4.Dataset(filename) TSFC=ncfile.variables['T_SFC'][:] fillvalue=ncfile.variables['T_SFC'].

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread questions anon
I have also tried Xavier's suggestion but only end up with one value as my average (instead of an array). I used: for a in TSFC: indexnonNaN=N.isfinite(a) SliceofTotoWithoutNan=a[indexnonNaN] print SliceofTotoWithoutNan TSFC=SliceofTo

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread questions anon
Thanks for responding. I have tried several ways of adding the command, one of which is: for i in TSFC: if N.any(N.isnan(TSFC)): break else: pass but nothing is happening, is there some particular way I need to

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Stéfan van der Walt
On Mon, Dec 5, 2011 at 12:10 PM, Charles R Harris wrote: > Well, that's a tough one. Numpy development tends to attract folks with > spare time, i.e., students*, and those with an itch to scratch. Itched > scratched, degree obtained, they go back to their primary interest or on to > jobs and the r

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread Xavier Barthelemy
Hi, I don't know if it is the best choice, but this is what I do in my code: for each slice: indexnonNaN=np.isfinite(SliceOf Toto) SliceOf TotoWithoutNan= SliceOf Toto [indexnonNaN] and then perform all operation I want o on the last array. i hope it does answer your question Xavier 2011/

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread David Cournapeau
On Mon, Dec 5, 2011 at 5:29 PM, questions anon wrote: > Maybe I am asking the wrong question or could go about this another way. > I have thousands of numpy arrays to flick through, could I just identify > which arrays have NAN's and for now ignore the entire array. is there a > simple way to do t

Re: [Numpy-discussion] ignore NAN in numpy.true_divide()

2011-12-05 Thread questions anon
Maybe I am asking the wrong question or could go about this another way. I have thousands of numpy arrays to flick through, could I just identify which arrays have NAN's and for now ignore the entire array. is there a simple way to do this? any feedback will be greatly appreciated. On Thu, Dec 1,

Re: [Numpy-discussion] What does fftn take as parameters?

2011-12-05 Thread David Cournapeau
On Mon, Dec 5, 2011 at 4:28 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > (Note I'm a programmer type, not a math type and am doing coding directed > by a matlab user.) > > I'm trying to do an fft on multiple columns of data at once (ultimately > feeding into a corre

Re: [Numpy-discussion] numpy 1.7.0 release

2011-12-05 Thread Tim Burgess
> > On Mon, Dec 5, 2011 at 9:13 PM, Charles R Harris > wrote: > >> >> >> On Mon, Dec 5, 2011 at 1:08 PM, Travis Oliphant >> wrote: >> >>> I like the idea. Is there resolution to the NA question? >>> >> >> No, people still disagree and are likely to do so for years to come with >> no end

[Numpy-discussion] What does fftn take as parameters?

2011-12-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (Note I'm a programmer type, not a math type and am doing coding directed by a matlab user.) I'm trying to do an fft on multiple columns of data at once (ultimately feeding into a correlation calculation). I can use fft() to work on one column: da

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-05 Thread Ralf Gommers
On Mon, Dec 5, 2011 at 9:13 PM, Charles R Harris wrote: > > > On Mon, Dec 5, 2011 at 1:08 PM, Travis Oliphant wrote: > >> I like the idea. Is there resolution to the NA question? >> > > No, people still disagree and are likely to do so for years to come with > no end in sight. That's why the pre

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-05 Thread Charles R Harris
On Mon, Dec 5, 2011 at 1:08 PM, Travis Oliphant wrote: > I like the idea. Is there resolution to the NA question? > No, people still disagree and are likely to do so for years to come with no end in sight. That's why the preview label. Chuck ___ NumP

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Charles R Harris
On Mon, Dec 5, 2011 at 12:43 PM, Benjamin Root wrote: > On Mon, Dec 5, 2011 at 12:06 PM, Mark Wiebe wrote: > >> On Sat, Dec 3, 2011 at 6:18 PM, Travis Oliphant wrote: >> >>> >>> Hi everyone, >>> >>> There have been some wonderfully vigorous discussions over the past few >>> months that have made

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-05 Thread Travis Oliphant
I like the idea. Is there resolution to the NA question? -- Travis Oliphant (on a mobile) 512-826-7480 On Dec 5, 2011, at 2:43 PM, Ralf Gommers wrote: > Hi all, > > It's been a little over 6 months since the release of 1.6.0 and the NA debate > has quieted down, so I'd like to ask your opi

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread David Cournapeau
On Mon, Dec 5, 2011 at 12:39 PM, Mark Wiebe wrote: > On Mon, Dec 5, 2011 at 8:58 AM, David Cournapeau wrote: >> >> On Sun, Dec 4, 2011 at 9:45 PM, Charles R Harris >> wrote: >> >> > >> > We'll see how much interest there is. If it becomes official you may get >> > more feedback on features. Ther

[Numpy-discussion] numpy 1.7.0 release?

2011-12-05 Thread Ralf Gommers
Hi all, It's been a little over 6 months since the release of 1.6.0 and the NA debate has quieted down, so I'd like to ask your opinion on the timing of 1.7.0. It looks to me like we have a healthy amount of bug fixes and small improvements, plus three larger chucks of work: - datetime - NA - Ben

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Benjamin Root
On Mon, Dec 5, 2011 at 12:06 PM, Mark Wiebe wrote: > On Sat, Dec 3, 2011 at 6:18 PM, Travis Oliphant wrote: > >> >> Hi everyone, >> >> There have been some wonderfully vigorous discussions over the past few >> months that have made it clear that we need some clarity about how >> decisions will be

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Mark Wiebe
On Sat, Dec 3, 2011 at 6:18 PM, Travis Oliphant wrote: > > Hi everyone, > > There have been some wonderfully vigorous discussions over the past few > months that have made it clear that we need some clarity about how > decisions will be made in the NumPy community. > > When we were a smaller bunch

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread mark florisson
On 5 December 2011 17:57, mark florisson wrote: > On 5 December 2011 17:48, Mark Wiebe wrote: >> On Mon, Dec 5, 2011 at 9:37 AM, mark florisson >> wrote: >>> >>> On 5 December 2011 17:25, Mark Wiebe wrote: >>> > On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving wrote: >>> >> >>> >> >>> >> >>>

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread mark florisson
On 5 December 2011 17:48, Mark Wiebe wrote: > On Mon, Dec 5, 2011 at 9:37 AM, mark florisson > wrote: >> >> On 5 December 2011 17:25, Mark Wiebe wrote: >> > On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving wrote: >> >> >> >> >> >> >> >> >> >> Back to the bugs: here's a branch with all the chan

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread Mark Wiebe
On Mon, Dec 5, 2011 at 9:37 AM, mark florisson wrote: > On 5 December 2011 17:25, Mark Wiebe wrote: > > On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving wrote: > >> > >> > >> > >> > >> Back to the bugs: here's a branch with all the changes I needed to get > >> rational arithmetic to work: > >>

[Numpy-discussion] astype does not work with NA object

2011-12-05 Thread Bruce Southey
Hi, I mistakenly filed ticket 1973 "Can not display a masked array containing np.NA values even if masked" (http://projects.scipy.org/numpy/ticket/1973) against masked array because that was where I found it. But the actual error is that the astype function does not handle the NA object: $ pyt

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread Mark Wiebe
On Mon, Dec 5, 2011 at 8:58 AM, David Cournapeau wrote: > On Sun, Dec 4, 2011 at 9:45 PM, Charles R Harris > wrote: > > > > > We'll see how much interest there is. If it becomes official you may get > > more feedback on features. There are some advantages to having some user > > types in numpy.

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread mark florisson
On 5 December 2011 17:25, Mark Wiebe wrote: > On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving wrote: >> >> >> >> >> Back to the bugs: here's a branch with all the changes I needed to get >> rational arithmetic to work: >> >>    https://github.com/girving/numpy >> >> I discovered two more after

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Bruce Southey
On 12/05/2011 06:22 AM, Perry Greenfield wrote: > I'm not sure I'm crazy about leaving final decision making for a > board. A board may be a good way of carefully considering the issues, > and it could make it's own recommendation (with a sufficient > majority). But in the end I think one person ne

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread Mark Wiebe
On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving wrote: > > > Back to the bugs: here's a branch with all the changes I needed to get > rational arithmetic to work: > >https://github.com/girving/numpy > > I discovered two more after the last email. One is another simple 0 > vs. 1 bug, and an

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread David Cournapeau
On Sun, Dec 4, 2011 at 9:45 PM, Charles R Harris wrote: > > We'll see how much interest there is. If it becomes official you may get > more feedback on features. There are some advantages to having some user > types in numpy. One is that otherwise they tend to get lost, another is that > having a

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread Geoffrey Irving
On Mon, Dec 5, 2011 at 6:59 AM, Charles R Harris wrote: > Hi Geoffrey, > > On Mon, Dec 5, 2011 at 12:37 AM, Geoffrey Irving wrote: >> >> On Sun, Dec 4, 2011 at 6:45 PM, Charles R Harris >> wrote: >> > >> > >> > On Sun, Dec 4, 2011 at 6:59 PM, Geoffrey Irving wrote: >> >> >> >> On Sun, Dec 4, 20

Re: [Numpy-discussion] failure to register ufunc loops for user defined types

2011-12-05 Thread Charles R Harris
Hi Geoffrey, On Mon, Dec 5, 2011 at 12:37 AM, Geoffrey Irving wrote: > On Sun, Dec 4, 2011 at 6:45 PM, Charles R Harris > wrote: > > > > > > On Sun, Dec 4, 2011 at 6:59 PM, Geoffrey Irving wrote: > >> > >> On Sun, Dec 4, 2011 at 5:18 PM, Charles R Harris > >> wrote: > >> > > >> > > >> > On Su

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Perry Greenfield
I'm not sure I'm crazy about leaving final decision making for a board. A board may be a good way of carefully considering the issues, and it could make it's own recommendation (with a sufficient majority). But in the end I think one person needs to decide (and that decision may go against

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-05 Thread Thouis Jones
On Fri, Dec 2, 2011 at 18:53, Charles R Harris wrote: > After sleeping on this, I think an object array in this situation would be > the better choice and wouldn't result in lost information. This might change > the behavior of > some functions though, so would need testing. I tried to come up w