[Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread Lane Brooks
I am trying out masked arrays for the first time and having some problems. I have a 2-D image as dtype=numpy.int16 I create a mask of all False to not mask out any pixels. I calculate the mean of the image original image and it comes out ~597. I calculate the mean of the masked array and it

Re: [Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread josef . pktd
On Sat, Apr 10, 2010 at 3:49 AM, Lane Brooks l...@brooks.nu wrote: I am trying out masked arrays for the first time and having some problems. I have a 2-D image as dtype=numpy.int16 I create a mask of all False to not mask out any pixels. I calculate the mean of the image original image and

Re: [Numpy-discussion] numpy build system questions for use in another project (fwrap)

2010-04-10 Thread Dag Sverre Seljebotn
Kurt Smith wrote: On Fri, Apr 9, 2010 at 2:25 AM, David da...@silveregg.co.jp wrote: On 04/07/2010 11:52 AM, Kurt Smith wrote: Briefly, I'm encountering difficulties getting things working in numpy distutils for fwrap's build system. Here are the steps I want the build system to accomplish:

[Numpy-discussion] Proposal for new ufunc functionality

2010-04-10 Thread Travis Oliphant
Hi, I've been mulling over a couple of ideas for new ufunc methods plus a couple of numpy functions that I think will help implement group-by operations with NumPy arrays. I wanted to discuss them on this list before putting forward an actual proposal or patch to get input from others.

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-10 Thread Pauli Virtanen
la, 2010-04-10 kello 12:23 -0500, Travis Oliphant kirjoitti: [clip] Here are my suggested additions to NumPy: ufunc methods: [clip] * reducein (array, indices, axis=0) similar to reduce-at, but the indices provide both the start and end points (rather than being

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-10 Thread josef . pktd
On Sat, Apr 10, 2010 at 1:23 PM, Travis Oliphant oliph...@enthought.com wrote: Hi, I've been mulling over a couple of ideas for new ufunc methods plus a couple of numpy functions that I think will help implement group-by operations with NumPy arrays. I wanted to discuss them on this list

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-10 Thread Stéfan van der Walt
On 10 April 2010 19:45, Pauli Virtanen p...@iki.fi wrote: Another addition to ufuncs that should be though about is specifying the Python-side interface to generalized ufuncs. This is an interesting idea; what do you have in mind? Regards Stéfan ___

[Numpy-discussion] INSTALLATION ON CYGWIN

2010-04-10 Thread AKI
There is too much out there which is making me confuse, I want to install Numpy and Scipy on cygwinCan some body give me steps...There is different version of Numpy ...which one i need to download.and how to check it after installing.. I already have cygwin full version on my pc...

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-10 Thread Robert Kern
On Sat, Apr 10, 2010 at 12:45, Pauli Virtanen p...@iki.fi wrote: la, 2010-04-10 kello 12:23 -0500, Travis Oliphant kirjoitti: [clip] Here are my suggested additions to NumPy: ufunc methods: [clip]       * reducein (array, indices, axis=0)                similar to reduce-at, but the indices

[Numpy-discussion] Simple way to shift array elements

2010-04-10 Thread Gökhan Sever
Hello, Is there a simpler way to get c from a I[1]: a = np.arange(10) I[2]: b = a[3:] I[3]: b O[3]: array([3, 4, 5, 6, 7, 8, 9]) I[4]: c = np.insert(b, [7]*3, 0) O[5]: array([3, 4, 5, 6, 7, 8, 9, 0, 0, 0]) a and c have to be same in length and the left shift must be balanced with equal

Re: [Numpy-discussion] Simple way to shift array elements

2010-04-10 Thread Keith Goodman
On Sat, Apr 10, 2010 at 5:17 PM, Gökhan Sever gokhanse...@gmail.com wrote: Hello, Is there a simpler way to get c from a I[1]: a = np.arange(10) I[2]: b = a[3:] I[3]: b O[3]: array([3, 4, 5, 6, 7, 8, 9]) I[4]: c = np.insert(b, [7]*3, 0) O[5]: array([3, 4, 5, 6, 7, 8, 9, 0, 0, 0]) a

Re: [Numpy-discussion] Simple way to shift array elements

2010-04-10 Thread Charles R Harris
On Sat, Apr 10, 2010 at 6:17 PM, Gökhan Sever gokhanse...@gmail.com wrote: Hello, Is there a simpler way to get c from a I[1]: a = np.arange(10) I[2]: b = a[3:] I[3]: b O[3]: array([3, 4, 5, 6, 7, 8, 9]) I[4]: c = np.insert(b, [7]*3, 0) O[5]: array([3, 4, 5, 6, 7, 8, 9, 0, 0, 0]) a

Re: [Numpy-discussion] Simple way to shift array elements

2010-04-10 Thread Gökhan Sever
On Sat, Apr 10, 2010 at 7:31 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Apr 10, 2010 at 6:17 PM, Gökhan Sever gokhanse...@gmail.comwrote: Hello, Is there a simpler way to get c from a I[1]: a = np.arange(10) I[2]: b = a[3:] I[3]: b O[3]: array([3, 4, 5, 6, 7, 8,

Re: [Numpy-discussion] numpy build system questions for use in another project (fwrap)

2010-04-10 Thread Kurt Smith
On Sat, Apr 10, 2010 at 9:53 AM, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: Kurt Smith wrote: On Fri, Apr 9, 2010 at 2:25 AM, David da...@silveregg.co.jp wrote: On 04/07/2010 11:52 AM, Kurt Smith wrote: Fortran's .mod files are essentially compiler-generated header files; fwrap

Re: [Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread Lane Brooks
On Apr 10, 2010, at 5:17 AM, josef.p...@gmail.com wrote: On Sat, Apr 10, 2010 at 3:49 AM, Lane Brooks l...@brooks.nu wrote: I am trying out masked arrays for the first time and having some problems. I have a 2-D image as dtype=numpy.int16 I create a mask of all False to not mask out any

Re: [Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread josef . pktd
On Sun, Apr 11, 2010 at 1:00 AM, Lane Brooks l...@brooks.nu wrote: On Apr 10, 2010, at 5:17 AM, josef.p...@gmail.com wrote: On Sat, Apr 10, 2010 at 3:49 AM, Lane Brooks l...@brooks.nu wrote: I am trying out masked arrays for the first time and having some problems. I have a 2-D image as