[Numpy-discussion] compress() signature

Robert Kern robert.kern@gmail....
Sun Aug 10 20:03:47 CDT 2008


On Sun, Aug 10, 2008 at 19:37, Christoph T. Weidemann <ctw@cogsci.info> wrote:
> The signature for numpy.compress() seems somewhat inconsistent with
> other functions, because the first argument it expects is not the
> array but the condition. This tends to throw me off when I use this
> function, because the common order for other functions seems to be:
> 1) input array
> 2) function specific argument(s) if applicable
> 3) axis
> 4) out (if applicable)
> 5) optional function specific argument(s) if applicable
>
> I think it would be nice to change the signature of compress() to
> bring it in line with the other functions, but obviously such a change
> would break some code without added functionality. What do people here
> think?

I don't think we will break code for this.

-- 
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