[Numpy-discussion] m-ary logical functions

Henry Gomersall heng@cantab....
Thu Jul 12 10:13:52 CDT 2012


On Thu, 2012-07-12 at 10:53 -0400, Neal Becker wrote:
> I've been bitten several times by this.
> 
> logical_or (a, b, c)
> 
> is silently accepted when I really meant
> 
> logical_or (logical_or (a, b), c)
> 
> because the logic functions are binary, where I expected them to be
> m-ary. 

I don't think you mean m-ary. It's just a simple binary OR of more than
one variable. I don't even know what a m-ary OR would mean (a bit-wise
OR of the binary representation?)

It's already a bit-wise OR of an array, that's the whole point
(otherwise you could just use `or'!)

Henry



More information about the NumPy-Discussion mailing list