1

I am using Python (both 2 and 3) for data analysis. When loading large data sets (eg. into a numpy array) then my whole system freezes. It does not react to anything, also not Ctr + Alt + F1. So I have to do an hard reset.

I have this problem in both Ubuntu and Debian.

Is there a way to execute a Python script "save", so that the script crashes and not the whole system?

arm
  • 11
  • Add a swap to your system ? Add more RAM ? I know this is not an option. May be it did not crash too, it is just swappping like hell you must have to wait. – solsTiCe Oct 03 '16 at 09:12
  • If it suites for your analysis, you could try to use generators in Python to improve memory usage. Like e.g. range vs. xrange where xrange behaves like a generator. – Thomas Oct 03 '16 at 09:40
  • Good question, solved with the duplicate. – don.joey Oct 04 '16 at 11:53

0 Answers0