Re: [Numpy-discussion] Median advice

2008-02-13 Thread Gael Varoquaux
On Tue, Feb 12, 2008 at 09:09:11PM +, 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,

Re: [Numpy-discussion] Median advice

2008-02-12 Thread Anne Archibald
On 12/02/2008, Matthew Brett [EMAIL PROTECTED] 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

Re: [Numpy-discussion] Median advice

2008-02-12 Thread Matthew Brett
Hi, On Feb 12, 2008 8:48 PM, Anne Archibald [EMAIL PROTECTED] wrote: On 12/02/2008, Matthew Brett [EMAIL PROTECTED] 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

Re: [Numpy-discussion] Median advice

2008-02-12 Thread Robert Kern
On Feb 12, 2008 6:33 AM, Joris De Ridder [EMAIL PROTECTED] wrote: On 12 Feb 2008, at 12:31, Matthew Brett wrote: def median(a, axis=0, out=None) (same signature as max, min etc) I would be slightly in favour of this option. Using the same signature would be convenient in code like def

Re: [Numpy-discussion] Median advice

2008-02-12 Thread Joris De Ridder
On 12 Feb 2008, at 12:31, Matthew Brett wrote: def median(a, axis=0, out=None) (same signature as max, min etc) I would be slightly in favour of this option. Using the same signature would be convenient in code like def myfunc(myarray, somefunc): # do stuff ... x =