numpy - There are plenty of free memory, but exit "MemoryError" in Python -


my computer 64 bit operating system of win7. ram 16gb. want load 1 gb csv data numpy.array. monitored resource , found program exited when memory reached 8.56gb.

my python version is: python 2.7.10 (default, may 23 2015, 09:44:00) [msc v.1500 64 bit (amd64)] on win32

the code:

qa_file=open("qa_urls.csv") urlreader=csv.reader(qa_file, delimiter=',', quotechar='"')  qa_hrefid=[] qa_postid=[] qa_posttypeid=[] qa_owneruserid=[] qa_parentid=[] qa_href=[] qa_creationdate=[]  line in urlreader:     if len(line)==7:         qa_hrefid.append(line[0])         qa_postid.append(line[1])         qa_posttypeid.append(line[2])         qa_owneruserid.append(line[3])         qa_parentid.append(line[4])         qa_href.append(line[5])         qa_creationdate.append(line[6])   np_qa_hrefid=np.array(qa_hrefid) np_qa_postid=np.array(qa_postid) np_qa_posttypeid=np.array(qa_posttypeid) np_qa_owneruserid=np.array(qa_owneruserid) np_qa_parentid=np.array(qa_parentid) np_qa_href=np.array(qa_href) np_qa_creationdate=np.array(qa_creationdate) 

the exception information:

traceback (most recent call last):   file "d:recommender.py", line 81, in <module>     np_qa_href=np.array(qa_href) memoryerror 

why did report "memoryerror" while there plenty of free memory?


Comments