[Numpy-discussion] compress() signature

Christoph T. Weidemann ctw at cogsci.info
Sun Aug 10 20:37:35 EDT 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
think?



More information about the NumPy-Discussion mailing list