Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Pierre GM
On Thursday 24 January 2008 15:58:14 Stefan van der Walt wrote: > How about masking the output where the condition is masked? > I.e. keep where condition is True, remove where condition is False and > mask where condition is masked. Won't systematically do, check one of the examples I gave in a p

Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Stefan van der Walt
Hi Pierre On Thu, Jan 24, 2008 at 04:58:04AM -0500, Pierre GM wrote: > On Thursday 24 January 2008 04:02:52 Stefan van der Walt wrote: > > I'm not 100% sure about the new behaviour -- compress now removes > > masked elements, instead of ignoring them. Whereas a person would > > have been able to

Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Pierre GM
On Thursday 24 January 2008 04:02:52 Stefan van der Walt wrote: > I'm not 100% sure about the new behaviour -- compress now removes > masked elements, instead of ignoring them. Whereas a person would > have been able to do > compress(x,condition).compressed() > before, the mask information is now

Re: [Numpy-discussion] numpy.ma.compress

2008-01-24 Thread Stefan van der Walt
Hi Pierre On Wed, Jan 23, 2008 at 08:45:26PM -0500, Pierre GM wrote: > All, > I just committed a fix on the SVN. Now, the axis keyword should be recognized. > Sorry for the delay. I'm not 100% sure about the new behaviour -- compress now removes masked elements, instead of ignoring them. Whereas

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Travis E. Oliphant
Pierre GM wrote: > Oh, a last comment question: > Is the current documentation standard definitive ? Yes. -Travis ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Pierre GM
All, I just committed a fix on the SVN. Now, the axis keyword should be recognized. Sorry for the delay. Pierre ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Pierre GM
Oh, a last comment question: Is the current documentation standard definitive ? It seems to have changed in the last few weeks (I haven't really followed what happened). If yes, I'll try to correct the current SVN version, but that may take a little while... __

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Pierre GM
On Wednesday 23 January 2008 17:05:25 Stefan van der Walt wrote: > On Wed, Jan 23, 2008 at 11:17:51AM -1000, Eric Firing wrote: > > Pierre, > > > > numpy.compress exists, but numpy.ma.compress does not; is this > > intentional? > > Looks like x.compress exists, but it doesn't work as expected: > >

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Eric Firing
Pierre GM wrote: > On Wednesday 23 January 2008 16:17:51 you wrote: >> Pierre, >> >> numpy.compress exists, but numpy.ma.compress does not; is this intentional? > > Probably not. I usually don't use this function, preferring to use indexing > instead. If you have a need for it, I can probably com

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Stefan van der Walt
Hi Eric, On Wed, Jan 23, 2008 at 11:17:51AM -1000, Eric Firing wrote: > Pierre, > > numpy.compress exists, but numpy.ma.compress does not; is this > intentional? Thanks for the report. I added a simple implementation to SVN for the time being. Regards Stéfan ___

Re: [Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Stefan van der Walt
On Wed, Jan 23, 2008 at 11:17:51AM -1000, Eric Firing wrote: > Pierre, > > numpy.compress exists, but numpy.ma.compress does not; is this > intentional? Looks like x.compress exists, but it doesn't work as expected: x = N.ma.array([1,2,3],mask=[True,False,Fals]) x.compress(x<2) throws ValueErr

[Numpy-discussion] numpy.ma.compress

2008-01-23 Thread Eric Firing
Pierre, numpy.compress exists, but numpy.ma.compress does not; is this intentional? Eric ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion