Posts

Showing posts from January 14, 2019

Tranvía de Sóller

Image
Tranvía de Sóller Tramcar 2 passing through the centre of Sóller Overview Type Tramway Locale Sóller (Spain) Termini Sóller Port de Sóller Stations 17 [1] Operation Opened 4 October 1913 [1] Owner Ferrocarril de Sóller S.A. Rolling stock 12 trams [1] Technical Line length 4.868 km (3.025 mi) Number of tracks Single track Track gauge 914mm [1] Electrification 600 V DC [1] overhead lines Operating speed 25 km/h (16 mph) Route map OpenStreetMap map of Sóller Tramway (not all stations shown) 4+86 La Payesa 4+65 Marysol 4+30 Can Generós 4+10 S'Eden 3+90 Las Palmeras 3+80 S'Espléndido 3+70 Sa Torre 3+45 Es Control 2+75 Roca Roja 2+50 Can Ahir 2+25 Can Llimó 2+00 Monument 1+60 L'Horta 1+20 Can Reus ...

Can I find out the allocation request that caused my Python MemoryError?

Image
16 3 Context My small Python script uses a library to work on some relatively large data. The standard algorithm for this task is a dynamic programming algorithm, so presumably the library "under the hood" allocates a large array to keep track of the partial results of the DP. Indeed, when I try to give it fairly large input, it immediately gives a MemoryError . Preferably without digging into the depths of the library, I want to figure out if it is worth trying this algorithm on a different machine with more memory, or trying to trim down a bit on my input size, or if it's a lost cause for the data size I am trying to use. Question When my Python code throws a MemoryError , is there a "top-down" way for me to investigate what the size of memory was that my code tried to allocate whi...