[Numpy-tickets] [NumPy] #346: Invalid promotion of numpy scalar to float64

NumPy numpy-tickets at scipy.net
Sat Oct 14 17:49:25 CDT 2006


#346: Invalid promotion of numpy scalar to float64
---------------------+------------------------------------------------------
 Reporter:  charris  |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  normal   |   Milestone:          
Component:  Other    |     Version:          
 Severity:  normal   |    Keywords:          
---------------------+------------------------------------------------------
 In [95]: a = np.float32(1)

 In [96]: a.dtype
 Out[96]: dtype('float32')

 In [97]: a /= 2

 In [98]: a.dtype
 Out[98]: dtype('float64')

 Result type of a should still be float32. This also holds for +=, -=, and
 *=.

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


More information about the Numpy-tickets mailing list