[Numpy-tickets] [NumPy] #630: If float('123.45') works, so should numpy.float32('123.45')

NumPy numpy-tickets@scipy....
Fri Apr 4 13:43:19 CDT 2008


#630: If float('123.45') works, so should numpy.float32('123.45')
-------------------------+--------------------------------------------------
 Reporter:  AndrewStraw  |        Owner:  somebody
     Type:  defect       |       Status:  new     
 Priority:  low          |    Milestone:  1.0.5   
Component:  numpy.core   |      Version:  none    
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by bsouthey):

 I would add that both float32 and float128 are currently inconsistent with
 float and float64 on Linux x86_64 Python 2.5.1 with NumPy 1.0.5.dev4961:
 {{{
 import numpy
 print numpy.__version__
 print 'numpy Float32 : ', numpy.float32('1.2345')
 print 'numpy Float128: ', numpy.float128('1.2345')
 }}}
 Gives:

 Float32 failed with:
 {{{
 ValueError : setting an array element with a sequence.
 }}}


 Float128 failed with:
 {{{
 TypeError : a float is required
 }}}

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


More information about the Numpy-tickets mailing list