Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use @profile decorator in my script

Hi experts!!

I write a script like this:

 from scipy.stats import uniform    
 import numpy as np
 print ('lalala')
 for j in LALA:
      algorithm (numpya arrays and other for and while cycles are invololved)

I have a RAM issue and i want to use @profile decorator. I install this for doing:

 $ easy_install -U memory_profiler # pip install -U memory_profiler

But when i write @profile in the start of the code and then I execute this, i get a ERROR.

How can I do for use the @profile (and others) decoretor?

Waiting for your answers.

Thanks a lot!