Currently, I'm trying to use memory_profiler in Jupiter notebook as the following code:
%load_ext memory_profiler
def test1(n):
return n+1
def test2(n):
i = test1(n)
%memit i
%memit test1(n)
test2(10)
And it return error "NameError: name 'i' is not defined"
Btw, I try again with %memit test1(10) inside function test2() and it works for %memit test1(10).
Can you guys help me to find the right way to use memory_profiler in jupyter notebook.
Currently, I'm trying to use memory_profiler in Jupiter notebook as the following code:
And it return error "NameError: name 'i' is not defined"
Btw, I try again with %memit test1(10) inside function test2() and it works for %memit test1(10). Can you guys help me to find the right way to use memory_profiler in jupyter notebook.
Many thanks.