importing a csv file as a Numeric array

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Mar 25 17:20:09 CET 2008


En Tue, 25 Mar 2008 06:46:57 -0300, Rahul <rpnabar at gmail.com> escribió:

> What's  a good way of importing a csv text file of floats into a
> Numeric array? I tried the csv module and it seems to work well so
> long as I've ints. Does anyone have any suggestions / snippets that
> work to import a csv file of floats into a Numeric array?

See the Cookbook at http://www.scipy.org/Cookbook/InputOutput - but I  
don't know how much of that is applicable to the old Numeric library.
Robert Kern posted a fairly generic approach in this thread  
http://groups.google.com/group/comp.lang.python/browse_thread/thread/7345c364cae59127/

-- 
Gabriel Genellina




More information about the Python-list mailing list