> I'm passing fairly large arrays around (using Numeric Py) > and I'm getting the error: > > MemoryError: can't allocate memory for array I have run into this problem before when writing C. I would have something like unsigned long int big_array[20][20][20][20][20]; and my program would segfault before it even started executing the main() function, even though I had plenty of memory. The problem went away when I made big_array an (unsigned long int)***** and assigned the array elements in slices at execution time. My theory was that the program wanted to lay the whole array down contiguously, and there was no contiguous chunk of memory available for that, even though the total memory available was more than enough. I know very little of the Numeric internals, but the manual says "Arrays created from scratch are always contiguous; non-contiguous arrays are the result of indexing and other structural operations." Perhaps you could make your arrays in slices, and then glom the slices together? Alex.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4