Getting killed message in Python - memory issue?

I have which I equal -loop, finally the length is about 180,000. Each element in is an array of 7680 . list .append() forlistlist numpy float32

Then I will convert the list into an array numpy, that is, I expect an array of the form (180000, 7680):

d = numpy.asarray( dlist, dtype = 'float32' )

This caused the script message to fail with the message Killed.

Is memory a problem? Assuming it float32takes 4 bytes, 180000x7680x4bytes = 5.5 GB.

I am using 64-bit Ubuntu, 12 GB RAM.

+4
source share
2 answers

Yes memory problem

, list - 180000 x 7680 x float32, / , numpy.asarray() , 1800000 x 7680 x numpy.float32 .

list, numpy.array,

, , , : scikit-learn matrix allocations in numpy-based or BLAS-direct calling method (.: Courtesy scikit-learn numpy BLAS - )

+1

, .

, , , 11 12 , , .

0

All Articles