[Numpy-tickets] [NumPy] #884: fromfile and fromstring locale dependency

NumPy numpy-tickets@scipy....
Tue Dec 30 06:00:04 CST 2008


#884: fromfile and fromstring locale dependency
-----------------------+----------------------------------------------------
 Reporter:  pv         |        Owner:  cdavid
     Type:  defect     |       Status:  new   
 Priority:  normal     |    Milestone:  1.3.0 
Component:  numpy.lib  |      Version:  none  
 Severity:  normal     |   Resolution:        
 Keywords:             |  
-----------------------+----------------------------------------------------
Comment (by pv):

 Possible fix attached; it's as close as I can do in imitating locale-
 independent fscanf for doubles in ~150 lines. It reads input from a file
 to a buffer (character bu character, essentially matching a regexp
 greedily), and calls PyOS_ascii_strtod on the buffer when it's filled.

 Remaining issues: ignore case when matching 'nan' and 'inf', and accept
 'nan(something)' (like strtod does).

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


More information about the Numpy-tickets mailing list