Re: [Numpy-discussion] median object

2009-07-07 Thread keflavich
Robert Kern-2 wrote: > > Mostly just history. Many, though certainly not all, single-argument > functions from Numeric became ndarray methods. I believe that median > was added after that event, and there is some resistance to adding yet > another method to ndarray. The implementor of numpy.ma

Re: [Numpy-discussion] median object

2009-07-07 Thread Robert Kern
On Tue, Jul 7, 2009 at 01:34, Scott Sinclair wrote: >> 2009/7/7 keflavich : >> >> Hi, I want to be able to do something like: >> >> import numpy >> x=numpy.array([1,4,4,6,7,3,4,2]) >> x.median() >> >> rather than >> numpy.median(x) >> >> so that in a function, I can call >> x.median() >> and allow

Re: [Numpy-discussion] median object

2009-07-07 Thread Robert Kern
On Mon, Jul 6, 2009 at 18:00, keflavich wrote: > > Hi, I want to be able to do something like: > > import numpy > x=numpy.array([1,4,4,6,7,3,4,2]) > x.median() > > rather than > numpy.median(x) > > so that in a function, I can call > x.median() > and allow x to be a masked array or a numpy array. >

Re: [Numpy-discussion] median object

2009-07-06 Thread Scott Sinclair
> 2009/7/7 keflavich : > > Hi, I want to be able to do something like: > > import numpy > x=numpy.array([1,4,4,6,7,3,4,2]) > x.median() > > rather than > numpy.median(x) > > so that in a function, I can call > x.median() > and allow x to be a masked array or a numpy array. > > Using the ma.median v

[Numpy-discussion] median object

2009-07-06 Thread keflavich
Hi, I want to be able to do something like: import numpy x=numpy.array([1,4,4,6,7,3,4,2]) x.median() rather than numpy.median(x) so that in a function, I can call x.median() and allow x to be a masked array or a numpy array. Using the ma.median version by default is something of a workaround,