importing a csv file as a Numeric array

R

Rahul

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?

-Rahul
 
G

Gabriel Genellina

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top