[NumPy-Tickets] [NumPy] #2051: Use the shortest repr for np.float32/float64

NumPy Trac numpy-tickets@scipy....
Sun Feb 12 17:53:43 CST 2012


#2051: Use the shortest repr for np.float32/float64
-------------------------+--------------------------------------------------
 Reporter:  beaujolais   |       Owner:  somebody   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  Other        |     Version:  1.6.1      
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by beaujolais):

 Sorry for the poor formatting:
 {{{
 >>> x = 0.1
 >>> x
 0.1
 >>> a = np.array([x])
 >>> a
 array([ 0.1])
 >>> a[0]
 0.10000000000000001
 >>> float(a[0])
 0.1
 >>> type(a[0])
 <class 'numpy.float64'>
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2051#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list