On Tue, Jul 10, 2007 at 11:31:35AM -0400, Alan G Isaac wrote: > Do you agree that the first (!!!) answer is a bug? > (The basis is apparently performed as follows: > integer array subtraction is first performed, and > then nonzero ints are converted to True. But this > gives the wrong answer and most critically breaks > the equivalence of a-b and a+(-b).)
OK, putting aside the useless maths, I agree that specifically having a-b != a+(-b) If numpy developpers agree, I think the proper solution is : """ def __sub__(self, b): return self.__add__(-b) """ I think to should allow to have more or less consistent operations. Gaƫl _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion