When you talk about algebra - one might have to restrict one self to '|' and '&' -- not use '+' and '-' E.g.: True - True = False # right !?
Not exactly because - True = + True So True - True = True + True = True You have to stay in the algebra the whole time. # but if:
True+True = True. # then True+True -False = True -False # ???? # here I'm already lost ... I don't think this can be done in a consistent way. In other words: a "+" operator would also need a corresponding "-" operator, and that will just look funny. I think if you want algebra, you should restrict yourself to "|" (or) and "&" (and)
When you make computation in the Bool algebra, you use + and * in every math book. In IT books, you see | and &. As Numpy is scientists oriented, I suppose that the definition of + and * is correct. Matthieu
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion