![](https://secure.gravatar.com/avatar/60e03bd1fd9f2dbc750e0899b9e7e71d.jpg?s=120&d=mm&r=g)
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