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

Re: [Numpy-discussion] Masked array usage

2008-11-27 Thread Robert Ferrell
Sweet. So simple. That works great. thanks, -robert On Nov 27, 2008, at 8:41 AM, Angus McMorland wrote: > 2008/11/27 Robert Ferrell <[EMAIL PROTECTED]>: >> I have a question about assigning to masked arrays. a is a len ==3 >> masked array, with 2 unmasked elements. b is a len == 2 array. I

Re: [Numpy-discussion] Masked array usage

2008-11-27 Thread Angus McMorland
2008/11/27 Robert Ferrell <[EMAIL PROTECTED]>: > I have a question about assigning to masked arrays. a is a len ==3 > masked array, with 2 unmasked elements. b is a len == 2 array. I > want to put the elements of b into the unmasked elements of a. How do > I do that? > > In [598]: a > Out[598]:

[Numpy-discussion] Masked array usage

2008-11-27 Thread Robert Ferrell
I have a question about assigning to masked arrays. a is a len ==3 masked array, with 2 unmasked elements. b is a len == 2 array. I want to put the elements of b into the unmasked elements of a. How do I do that? In [598]: a Out[598]: masked_array(data = [1 -- 3], mask = [False T