[Numpy-discussion] m-ary logical functions
Nathaniel Smith
njs at pobox.com
Thu Jul 12 11:21:30 EDT 2012
On Thu, Jul 12, 2012 at 4:13 PM, Henry Gomersall <heng at cantab.net> wrote:
> 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'!)
Different "ary": https://en.wikipedia.org/wiki/Arity
-n
More information about the NumPy-Discussion
mailing list