[Numpy-discussion] Median advice

Anne Archibald peridot.faceted@gmail....
Tue Feb 12 14:48:16 CST 2008

On 12/02/2008, Matthew Brett <matthew.brett@gmail.com> wrote:

> Suggestion 1:
> def median(a, axis=0, out=None)
> Suggestion 2:
> def median(a, axis=0, scratch_input=False)

No reason not to combine the two. It's a pretty straightforward
modification to do the sorting in place, and it could make a lot more
difference to the runtime (and memory usage) than an output array.


More information about the Numpy-discussion mailing list