I read in an large python array from a csv file (20332 *17009) using window7 64 bit OS machine with 12 G ram. The array has values in the half of places, like the example below. I only need the array where has values for analysis, rather than the whole array.
[0 0 0 0 0 0
0 0 0 3 8 0
0 4 2 7 0 0
0 0 5 2 0 0
0 0 1 0 0 0]
I am wondering: is it possible to ignore 0 value for analysis and save more memory?
Thanks in advance!
NAvs data of interest? What is the real size we are taking about? Your example is 6x5 so the bother of 'saving memory' is not really worth the effort. Are we talking thousands by thousands? How many areNAvsA? The more you say, the more applicable the answer...mmapmight help especially with a 64-bit Python.