[NumPy-Tickets] [NumPy] #2009: Forward operations of numpy.ndarray incompatible with numpy.float**

NumPy Trac numpy-tickets@scipy....
Tue Jan 3 18:46:09 CST 2012


#2009: Forward operations of numpy.ndarray incompatible with numpy.float**
----------------------------------------------------+-----------------------
 Reporter:  mrclary                                 |       Owner:  somebody
     Type:  defect                                  |      Status:  new     
 Priority:  high                                    |   Milestone:  1.6.2   
Component:  numpy.core                              |     Version:  1.6.1   
 Keywords:  numpy, ndarray, dtype, object, float64  |  
----------------------------------------------------+-----------------------
 Forward operations (+-*/) involving a numpy.ndarray of dtype=object and
 numpy.float** give a TypeError. Leftward operations do not give a
 TypeError.[[BR]]
 {{{
 numpy.array([1.], dtype=object) + numpy.float(1)  # OK
 numpy.array([1.], dtype=object) + numpy.float16(1)  # Not OK
 numpy.array([1.], dtype=object) + numpy.float32(1)  # Not OK
 numpy.array([1.], dtype=object) + numpy.float64(1)  # Not OK
 numpy.array([1.], dtype=object) + numpy.float128(1)  # Not OK
 numpy.float16(1) + numpy.array([1.], dtype=object)  # OK
 numpy.float32(1) + numpy.array([1.], dtype=object)  # OK
 numpy.float64(1) + numpy.array([1.], dtype=object)  # OK
 numpy.float128(1) + numpy.array([1.], dtype=object)  # OK
 }}}

 Numpy 1.6.1
 Python 2.7.2
 Both via MacPorts
 Mac OS X 10.7.2

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2009>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list