3 ms·
Growing with vstack or hstack is very slow. I have seen code where a big csv with time series data is parsed line by line the corresponding numpy array was grow
by xaedes 10y ago
Growing with vstack or hstack is very slow.
I have seen code where a big csv with time series data is parsed line by line the corresponding numpy array was grown using vstack for each row. worst case: quadratic runtime
- xapata 10y agoThat'd be so much faster using a generator and a NumPy.concatenate at the end. Orders of magnitude faster, if we're talking about a large CSV.