[Numpy-discussion] Issues to fix for 1.7.0rc2.

Charles R Harris charlesr.harris@gmail....
Wed Feb 6 01:41:23 CST 2013

On Tue, Feb 5, 2013 at 11:50 PM, Jason Grout <jason-sage@creativetrax.com>wrote:

> On 2/6/13 12:46 AM, Charles R Harris wrote:
> > if we decide to do so
> I should mention that we don't really depend on either behavior (we
> probably should have a better doctest testing for an array of None
> values anyway), but we noticed the oddity and thought we ought to
> mention it.  So it doesn't matter to us which way the decision goes.
More Python craziness

In [6]: print None or 0

In [7]: print 0 or None

Numpy any is consistent with python when considered as logical_or.reduce

In [13]: print array([0, None]).any()

In [14]: print array([None, 0]).any()

This appears to be an __ror__, __or__ inconsistency in python. Note that
None possesses neither of those operators.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130206/5975ed55/attachment.html 

More information about the NumPy-Discussion mailing list