[Scipy-tickets] [SciPy] #203: extension to io.read_array : parse strings as arrays

SciPy scipy-tickets at scipy.net
Tue Nov 28 06:39:24 CST 2006


#203: extension to io.read_array : parse strings as arrays
------------------------------------+---------------------------------------
 Reporter:  nodwell at physics.ubc.ca  |        Owner:  somebody
     Type:  enhancement             |       Status:  new     
 Priority:  normal                  |    Milestone:          
Component:  scipy.io                |      Version:  0.4.8   
 Severity:  normal                  |   Resolution:          
 Keywords:                          |  
------------------------------------+---------------------------------------
Comment (by wnbell):

 Why not use StringIO?


 In [1]: from scipy import *

 In [2]: import StringIO

 In [3]: B = '# comment line\n3 4 5\n2 1 5'

 In [4]: io.read_array(StringIO.StringIO(B))
 [[BR]]

 Out[4]:
 array([[ 3.,  4.,  5.],
        [ 2.,  1.,  5.]])

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/203#comment:1>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list