[Numpy-tickets] [NumPy] #997: [proposal][patch] bool(array) should "do the right thing" in the unambiguous cases.

NumPy numpy-tickets@scipy....
Wed Feb 4 02:36:15 CST 2009


#997: [proposal][patch] bool(array) should "do the right thing" in the
unambiguous cases.
--------------------------------------------------------------------------------+
 Reporter:  alsuren                                                             |        Owner:  somebody
     Type:  enhancement                                                         |       Status:  new     
 Priority:  normal                                                              |    Milestone:  1.3.0   
Component:  Other                                                               |      Version:  none    
 Severity:  normal                                                              |   Resolution:          
 Keywords:  assert, bool, ValueError, array, ambiguous, inconsistent, compare,  |  
--------------------------------------------------------------------------------+
Comment (by rkern):

 I'm -1 on this. I think it will just add to the confusion. The comparison
 will still raise errors in the ambiguous cases, so code that is not
 explicit will still fail with some inputs. However, the few cases that do
 work will trick people into thinking that comparison always work.

 People often just try out a quick example in the interpreter to see if it
 works. However, they try just *one* example, and not all of the
 variations. We saw exactly this behavior with Numeric, and a number people
 had incorrect code that was not caught for a long time.

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/997#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list