<br><br><div><span class="gmail_quote">On 7/7/07, <b class="gmail_sendername">Timothy Hochberg</b> <<a href="mailto:tim.hochberg@ieee.org">tim.hochberg@ieee.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div><div><span class="e" id="q_113a17306764bece_1"><span class="gmail_quote">On 7/7/07, <b class="gmail_sendername">Travis Oliphant</b> <<a href="mailto:oliphant.travis@ieee.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
oliphant.travis@ieee.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>><br>><br>> On 7/6/07, *Travis Oliphant* <<a href="mailto:oliphant.travis@ieee.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">oliphant.travis@ieee.org</a><br>> <mailto:<a href="mailto:oliphant.travis@ieee.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
oliphant.travis@ieee.org</a>>> wrote:
<br>></blockquote></span></div></div></blockquote><div><br><snip><br><br>Here is a link to <a href="http://www.python.org/dev/peps/pep-0285/">PEP 285</a> where Guido discusses his reasoning about the bool type. I note that boolean arrays behave as integers under addition of a scalar, but not under addition of boolean arrays, where '+' seems to mean 'or'.  The latter looks inconsistent with the Python convention.
<br><br><span style="font-family: courier new,monospace;">In [60]: a</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Out[60]: array([ True,  True,  True,  True], dtype=bool)
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">In [61]: a + a</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Out[61]: array([ True,  True,  True,  True], dtype=bool)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
In [62]: a + 1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Out[62]: array([2, 2, 2, 2])</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">In [66]: True + True</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Out[66]: 2</span><br><br>Now might be a good time to discuss and document these choices.
<br><br>Chuck<br></div><br></div><br>