First time here? Check out the FAQ!
answered 2013-08-20 08:02:01 +0100
@profile is a function decorator, it can be only applied to a function or method. Wrap your code in a function and apply @profile to it, as shown in the examples of https://pypi.python.org/pypi/memory_profiler.
@profile