Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIX: for keyword arguments

  • Loading branch information...
commit 79bb1aa5b2d8e67ab16e47e536c3bf1affa5e641 1 parent adfc6fd
Fabian Pedregosa authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  memory_profiler.py
3  memory_profiler.py
View
@@ -106,6 +106,9 @@ def memory_usage(proc=-1, interval=.1, timeout=None, run_in_place=False):
raise ValueError
aspec = inspect.getargspec(f)
+ n_args = len(aspec.args)
+ if aspec.defaults is not None:
+ n_args -= len(aspec.defaults)
if len(aspec.args) != len(args):
raise ValueError(
'Function expects %s value(s) but %s where given'
Please sign in to comment.
Something went wrong with that request. Please try again.