Wed Sep 2 11:20:36 CDT 2009
On Wed, Sep 2, 2009 at 11:11, Citi, Luca<firstname.lastname@example.org> wrote:
> I know I am splitting the hair, but should not
> np.bitwise_and.identity be -1 instead of 1?
> I mean, something with all the bits set?
Probably. However, the .identity parts of ufuncs were designed mostly
to support multiply and add, so .identity is restricted to 0, 1, or
nothing currently. It will take some effort to change that. In the C
code, the sentinel value for "no identity" is -1, alas.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion