Re: [Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread josef . pktd
On Sun, Apr 11, 2010 at 1:00 AM, Lane Brooks 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 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 >>>

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

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 wrote: > Kurt Smith wrote: >> On Fri, Apr 9, 2010 at 2:25 AM, David wrote: >>> On 04/07/2010 11:52 AM, Kurt Smith wrote: >> Fortran's .mod files are essentially compiler-generated header files; >> fwrap needs to use these 'headers' to get typ

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 wrote: > > > On Sat, Apr 10, 2010 at 6:17 PM, Gökhan Sever 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 =

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

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

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

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

2010-04-10 Thread Robert Kern
On Sat, Apr 10, 2010 at 12:45, Pauli Virtanen 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] 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... Ak

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

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 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 before putting f

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 fen

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

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

Re: [Numpy-discussion] Masked Array Usage Problems

2010-04-10 Thread josef . pktd
On Sat, Apr 10, 2010 at 3:49 AM, Lane Brooks 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 it comes

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