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 charlesr.har...@gmail.com 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.

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] 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 irv...@naml.us wrote: On Sun, Dec 4, 2011 at 6:45 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Dec 4, 2011 at 6:59 PM, Geoffrey Irving irv...@naml.us wrote: On Sun, Dec 4, 2011 at 5:18 PM, Charles R Harris

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 charlesr.har...@gmail.com wrote: Hi Geoffrey, On Mon, Dec 5, 2011 at 12:37 AM, Geoffrey Irving irv...@naml.us wrote: On Sun, Dec 4, 2011 at 6:45 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Dec 4, 2011 at 6:59 PM,

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 charlesr.har...@gmail.com 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,

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 irv...@naml.us wrote: snip 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

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 needs

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 mwwi...@gmail.com wrote: On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving irv...@naml.us wrote: snip 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

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 courn...@gmail.com wrote: On Sun, Dec 4, 2011 at 9:45 PM, Charles R Harris charlesr.har...@gmail.com 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

[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: $

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 markflorisso...@gmail.comwrote: On 5 December 2011 17:25, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving irv...@naml.us wrote: snip Back to the bugs: here's a branch with all the changes I needed to

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 mwwi...@gmail.com wrote: On Mon, Dec 5, 2011 at 9:37 AM, mark florisson markflorisso...@gmail.com wrote: On 5 December 2011 17:25, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Dec 4, 2011 at 11:37 PM, Geoffrey Irving irv...@naml.us wrote: snip

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 markflorisso...@gmail.com wrote: On 5 December 2011 17:48, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Dec 5, 2011 at 9:37 AM, mark florisson markflorisso...@gmail.com wrote: On 5 December 2011 17:25, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Dec

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Mark Wiebe
On Sat, Dec 3, 2011 at 6:18 PM, Travis Oliphant teoliph...@gmail.comwrote: 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

[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 -

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 ralf.gomm...@googlemail.com 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

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Charles R Harris
On Mon, Dec 5, 2011 at 12:43 PM, Benjamin Root ben.r...@ou.edu wrote: On Mon, Dec 5, 2011 at 12:06 PM, Mark Wiebe mwwi...@gmail.com wrote: On Sat, Dec 3, 2011 at 6:18 PM, Travis Oliphant teoliph...@gmail.comwrote: Hi everyone, There have been some wonderfully vigorous discussions over the

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 charlesr.har...@gmail.comwrote: On Mon, Dec 5, 2011 at 1:08 PM, Travis Oliphant oliph...@enthought.comwrote: 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

[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:

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 charlesr.har...@gmail.comwrote: On Mon, Dec 5, 2011 at 1:08 PM, Travis Oliphant oliph...@enthought.comwrote: I like the idea. Is there resolution to the NA question? No, people still disagree and are likely to do so for years

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] 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

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 charlesr.har...@gmail.com 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

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

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'][:]

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] 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

Re: [Numpy-discussion] NumPy Governance

2011-12-05 Thread Matthew Brett
Hi, 2011/12/5 Stéfan van der Walt ste...@sun.ac.za: 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

[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

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. The

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.

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