[Numpy-tickets] [NumPy] #733: check_object_casting failing on Python 2.6

NumPy numpy-tickets@scipy....
Thu Apr 17 21:53:48 CDT 2008


#733: check_object_casting failing on Python 2.6
-----------------------------+----------------------------------------------
 Reporter:  albertstrasheim  |        Owner:  somebody
     Type:  defect           |       Status:  new     
 Priority:  normal           |    Milestone:  1.0.5   
Component:  Other            |      Version:  devel   
 Severity:  normal           |   Resolution:          
 Keywords:                   |  
-----------------------------+----------------------------------------------
Comment (by charris):

 The plot thickens:


 {{{
 >>> y = np.zeros([200,200], dtype=np.float32)
 >>> y |= y
 >>> y = np.zeros([20,20], dtype=np.float32)
 >>> y |= y
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: unsupported operand type(s) for |: 'float' and 'float'
 }}}


 The result depends on the size of the array! And the onset is suspicious


 {{{
 >>> y = np.zeros([9999], dtype=np.float32)
 >>> y |= y
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: unsupported operand type(s) for |: 'float' and 'float'
 >>> y = np.zeros([10000], dtype=np.float32)
 >>> y |= y

 }}}

 Although 10000 sure doesn't look like the usual binary thingie.

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


More information about the Numpy-tickets mailing list