[Numpy-discussion] strange nan in np.ma.average

2012-01-03 Thread Chao YUE
Dear all numpy users, I have 10 90X720 arrays. let's say they are in a list 'a' with each element a 90X720 numpy masked array. then I create a new empty ndarray: data data=np.empty([10,90,720]) ##first I store all the 10 ndarray in a 10X90X720 array: for i,d in enumerate(a): data[i]=a

Re: [Numpy-discussion] polynomial package update

2012-01-03 Thread Charles R Harris
On Mon, Jan 2, 2012 at 10:46 PM, josef.p...@gmail.com wrote: On Mon, Jan 2, 2012 at 9:44 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've made a pull request for a rather large update of the polynomial package. The new features are 1) Bug fixes 2) Improved

[Numpy-discussion] choose - segfault

2012-01-03 Thread Neal Becker
I made 2 mistakes here, the 1st argument had the wrong shape, and I really wanted to use 'where', not 'choose'. But shouldn't segfault: ValueError: Need between 2 and (32) array objects (inclusive). Segmentation fault (core dumped) ___

Re: [Numpy-discussion] choose - segfault

2012-01-03 Thread Robert Kern
On Tue, Jan 3, 2012 at 14:42, Neal Becker ndbeck...@gmail.com wrote: I made 2 mistakes here, the 1st argument had the wrong shape, and I really wanted to use 'where', not 'choose'.  But shouldn't segfault: ValueError: Need between 2 and (32) array objects (inclusive). Segmentation fault (core

[Numpy-discussion] Enum type

2012-01-03 Thread Ognen Duzlevski
Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel comfortable with my understanding of adding a simple type to numpy in technical terms. I am mostly a C programmer and have

[Numpy-discussion] nested_iters does not accept length zero nest (also doesn't have documentation)

2012-01-03 Thread John Salvatier
Hellow, while using the nested_iters function, I've noticed that it does not accept length zero nestings. For example, the following fails: nested_iters([ones(3),ones(3)], [[], [0]]) with ValueError: If 'op_axes' or 'itershape' is not NULL in theiterator constructor, 'oa_ndim' must be greater

Re: [Numpy-discussion] strange nan in np.ma.average

2012-01-03 Thread Chao YUE
the problem is here, data=np.empty([10,90,720]) you should always use np.ma.empty if you want to construct a masked empty array. Chao 2012/1/3 Chao YUE chaoyue...@gmail.com Dear all numpy users, I have 10 90X720 arrays. let's say they are in a list 'a' with each element a 90X720 numpy

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Wes McKinney
On Tue, Jan 3, 2012 at 12:46 PM, Ognen Duzlevski og...@enthought.com wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel comfortable with my understanding of adding

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Jim Vickroy
On 1/3/2012 10:46 AM, Ognen Duzlevski wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel comfortable with my understanding of adding a simple type to numpy in

Re: [Numpy-discussion] GSOC

2012-01-03 Thread Chris Barker
On Fri, Dec 30, 2011 at 9:43 PM, Jaidev Deshpande deshpande.jai...@gmail.com wrote: Documentation is specificsly excluded from GSoC (at least it was a couple years ago when I last was involved) Documentation wasn't excluded last year from GSoC, there were quite a few projects that required a

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Wes McKinney
On Tue, Jan 3, 2012 at 1:06 PM, Jim Vickroy jim.vick...@noaa.gov wrote: On 1/3/2012 10:46 AM, Ognen Duzlevski wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Ognen Duzlevski
On Tue, Jan 3, 2012 at 12:46 PM, Wes McKinney wesmck...@gmail.com wrote: On Tue, Jan 3, 2012 at 1:06 PM, Jim Vickroy jim.vick...@noaa.gov wrote: On 1/3/2012 10:46 AM, Ognen Duzlevski wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Dag Sverre Seljebotn
On 01/03/2012 06:46 PM, Ognen Duzlevski wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel comfortable with my understanding of adding a simple type to numpy in

[Numpy-discussion] numpy dgemm link error

2012-01-03 Thread Amos Anderson
Hello -- I've been having some problems building numpy. The first problem I had error: unrecognizable insn, I was able to fix by following these instructions: http://www.mail-archive.com/numpy-discussion@scipy.org/msg34238.html Could you try the following, at line 38, to add the following:

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Nathaniel Smith
On Tue, Jan 3, 2012 at 9:46 AM, Ognen Duzlevski og...@enthought.com wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the https://github.com/martinling/numpy_quaternion and I feel comfortable with my understanding of adding a

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Ognen Duzlevski
Nathaniel, On Tue, Jan 3, 2012 at 2:02 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Jan 3, 2012 at 9:46 AM, Ognen Duzlevski og...@enthought.com wrote: Hello, I am playing with adding an enum dtype to numpy (to get my feet wet in numpy really). I have looked at the

[Numpy-discussion] what is the best way to pass c, c++ array to numpy in cython?

2012-01-03 Thread Wonjun, Choi
hello, what is the best way to pass c, c++ array to numpy in cython? or what is the best way to pass fortran multi-dimensional array to numpy in cython? Wonjun, Choi ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] find location of maximum values

2012-01-03 Thread questions anon
Thanks for your responses but I am still having difficuties with this problem. Using argmax gives me one very large value and I am not sure what it is. There shouldn't be any issues with the shape. The latitude and longitude are the same shape always (covering a state) and the temperature (TSFC)

Re: [Numpy-discussion] Enum type

2012-01-03 Thread Travis Oliphant
A categorical type (or enum type) is an important dtype to add to NumPy. It would be very nice if the option existed to make the categorical dtype dynamic in that the categories can grow as more data is added or inserted into the array. This would effectively allow binning of data on

[Numpy-discussion] SParse feature vector generation

2012-01-03 Thread Dhruvkaran Mehta
Hi numpy users, *Is there a convenient way in numpy to go from string features like:* uc_berkeley, google, 1 stanford, intel, 1 . . . uiuc, texas_instruments, 0 *to a numpy matrix like:* uc_berkeley, stanford, ..., uiuc, google, intel, texas_instruments, bool 10

Re: [Numpy-discussion] what is the best way to pass c, c++ array to numpy in cython?

2012-01-03 Thread Gael Varoquaux
On Tue, Jan 03, 2012 at 07:56:52PM -0800, Wonjun, Choi wrote: what is the best way to pass c, c++ array to numpy in cython? I don't know if it is the best way, but I wrote a self-contained example a little while ago, to explain to people one way of doing it: