I'm trying to use the line magic %lprun in jupyter notebook running a python 2.7.5 kernel.
The code I'm trying to run is the following:
%load_ext line_profiler
distance = 20
veg_slope = 0
slope = 10
%lprun test = bal.run('forest', veg_slope, slope, distance, FFDI=100)
The bal.run code is a bit complicated, but executing the code with those parameters will output the following tuple:
(35.02405579440225, 'BAL-40')
However if I try to use the %lprun magic I get the following error:
File "<string>", line 1
test = bal.run(\'forest\', veg_slope, slope, distance, FFDI=100)
^
SyntaxError: unexpected character after line continuation character
Not sure what is happening there, but as a test I tried to run a simple python function like print together with the line_profiler, and that worked.
Anyone has any idea of what the problem could be?