ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
[Tutor] Problems creating very large arrays (over 10 million indices)
by other posts by this author
Jul 1 2003 2:26PM messages near this date
Re: [Tutor] finding factorials - hmm..., gcd | Re: [Tutor] Problems creating very large arrays (over 10 million indices)
I need to initialize an array with sizes greater than 10 million indices. 
The reason for this is because I then proceed to fill in the array but 
jumping around.  (The array is used to store binary medical image data)  I 
tried using a for loop like so


for i in range(0, arraySize): #arraySize being over 10 million
        myArray.append(0)       #just use zero as a place holder

WHen arraySize is small under 200,000 or so it works okay (though very 
very slow)  Anything larger than this and it just crashes.  I have 2 gigs 
of memory so I'm not running out of memory. 

Two Questions...

1)  Why does this crash?
2) Is there a faster, stable way to do what I want to do

Thank you for all the help

~Edmund Dorsey
Thread:

John P Speno

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved