[Numpy-discussion] Median method for ndarray

Robert Kern robert.kern@gmail....
Wed Oct 27 10:38:48 CDT 2010


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


More information about the NumPy-Discussion mailing list