[Numpy-discussion] compress() signature

Christoph T. Weidemann ctw@cogsci.i...
Sun Aug 10 19:37:35 CDT 2008

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

More information about the Numpy-discussion mailing list