[Numpy-discussion] Median advice

Gael Varoquaux gael.varoquaux@normalesup....
Wed Feb 13 02:13:44 CST 2008


On Tue, Feb 12, 2008 at 09:09:11PM +0000, Matthew Brett 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.

> Yes, true.  I'll include it unless anyone pipes up to object.

Scratch_input is not clear at all for me. I would suggest "inplace"
rather.

Gaël


More information about the Numpy-discussion mailing list