Sebastian Haase wrote: > Hi! > when calling compress > I get this error message after moving to numpy: > > ValueError: 'condition must be 1-d array' > > Is the reason for this the change of the default axis from > axis=0 > to > axis=None
Not really, it's just that N-d arrays don't make much sense as condition masks. The only reasonable interpretation is that one takes the flattened form of both the condition mask and the target array; however, this is an implicit interpretation of what the user wants. As explicit is usually better than implicit, just flatten the condition mask. > What does axis=None mean in this case !? That the condition mask applies to the flattened array. -- 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 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion