[Numpy-discussion] Should bool_ subclass int?
Tue Jul 10 07:45:15 CDT 2007
> When you talk about algebra - one might have to restrict one self to '|'
> and '&'
> -- not use '+' and '-'
> 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
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion