Median method for ndarray

Hello, Is there a particular reason why there isn't a median method for ndarray? If not so, could we get one? Probably will go somewhere in this file: http://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/methods.... I find it more practical to do array.mean() rather than np.mean(array), likewise would be useful having a similar method for median calculation. Thanks. -- Gökhan

On Wed, Oct 27, 2010 at 10:12, Gökhan Sever <gokhansever@gmail.com> wrote:
Hello,
Is there a particular reason why there isn't a median method for ndarray?
numpy.median() is coded in Python, not C. There is often no particular reason that a numpy function is duplicated as an ndarray method except that when numpy was made, many of those functions were already in C and could be easily made into methods. A choice was made at that time to make many of those methods. The reasoning behind that choice is not always strong.
If not so, could we get one?
-1. Not every function in numpy must be an ndarray method. I don't want to dilute the methods further. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (2)
-
Gökhan Sever
-
Robert Kern