From: Peter V. <ve...@em...> - 2004-06-24 12:38:14
|
The documentation of the compress function states that the condition must be equal to the given axis of the array that is compressed. e.g.: >>> a = array([[1,2],[3,4]]) >>> print compress([1,0], a, axis = 1) [[1] [3]] However, this also works fine: >>> print compress([[1,0],[0,1]], a) [1, 4] which is great (I need that) but not documented. Is that behaviour intended? If so it maybe should be documented. Cheers, Peter |