<p dir="auto">All other bits come out 0:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [2]: a=numpy.array([0x1,0x3])

In [3]: numpy.bitwise_and.reduce(a)
Out[3]: 1

In [4]: a=numpy.array([0x2,0x3])

In [5]: numpy.bitwise_and.reduce(a)
Out[5]: 0"><pre class="notranslate"><code class="notranslate">In [2]: a=numpy.array([0x1,0x3])

In [3]: numpy.bitwise_and.reduce(a)
Out[3]: 1

In [4]: a=numpy.array([0x2,0x3])

In [5]: numpy.bitwise_and.reduce(a)
Out[5]: 0
</code></pre></div>
<p dir="auto">Surely this is because <code class="notranslate">bitwise_and.identity</code> is 1, when it should be -1 (i.e. all bits set).</p>
<p dir="auto">In numpy 1.9.0 I get the following</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; numpy.bitwise_and.identity
1"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; numpy.bitwise_and.identity
1
</code></pre></div>
<p dir="auto">But the correct identity should be a pattern of all 1's (for whatever the operation type is). This leads to bizarre results like the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; numpy.bitwise_and.reduce([4])
0"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; numpy.bitwise_and.reduce([4])
0
</code></pre></div>