You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume a function:
`def function1(x, y):
z = x+y
return z'
I would normally invoke it like so: result = function1(10, 50)
and I can use result for subsequent computations.
But let's say I want to profile the memory usage and invoke it like so: mem_usage = memory_usage((function1, (10,50, )))
The code returns the correct memory usage, but there is no way I can declare an output variable for the function so that I can use it in subsequent steps.
Activity
Dayof commentedon Aug 29, 2022
you can set the flag
retvalasTrueto get the memory usage + your function output: