[Numpy-discussion] Memory efficient alternative for np.loadtxt and np.genfromtxt

Robert Kern robert.kern at gmail.com
Sun Oct 26 09:32:18 EDT 2014


On Sun, Oct 26, 2014 at 1:21 PM, Eelco Hoogendoorn
<hoogendoorn.eelco at gmail.com> wrote:
> Im not sure why the memory doubling is necessary. Isnt it possible to
> preallocate the arrays and write to them?

Not without reading the whole file first to know how many rows to preallocate.

-- 
Robert Kern



More information about the NumPy-Discussion mailing list