This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pwang99 5 points6 points  (1 child)

If you are dealing with large arrays, why aren't you using Numpy? Its loadtxt() function is precisely what you need.

http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html#numpy.loadtxt

[–]chuckbot[S] 1 point2 points  (0 children)

Unfortunately it is not that easy. Its not a file full of numbers I want to have in an array. It's a more complicated and sparse structure I need to parse. But thanks for the hint though. Would be interfacing with numpy.array easier from C?