[Numpy-tickets] [NumPy] #743: Array content zeroed by |= even though exception raised

NumPy numpy-tickets@scipy....
Fri Apr 18 02:56:01 CDT 2008


#743: Array content zeroed by |= even though exception raised
---------------------+------------------------------------------------------
 Reporter:  charris  |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  normal   |   Milestone:  1.0.5   
Component:  Other    |     Version:  none    
 Severity:  major    |    Keywords:          
---------------------+------------------------------------------------------
 This bug is also dependent on the array size:


 {{{
 In [9]: a = ones((10000,))

 In [10]: a |= a
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/charris/<ipython console> in <module>()

 TypeError: unsupported operand type(s) for |: 'float' and 'float'

 In [11]: a
 Out[11]: array([ 0.,  0.,  0., ...,  0.,  0.,  0.])

 In [14]: a = ones((9999,))

 In [15]: a |= a
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/charris/<ipython console> in <module>()

 TypeError: unsupported operand type(s) for |: 'float' and 'float'

 In [16]: a
 Out[16]: array([ 1.,  1.,  1., ...,  1.,  1.,  1.])

 }}}

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


More information about the Numpy-tickets mailing list