test/test_density_cluster.py
def time_function(f, *args):
  """
  Call a function f with args and return the time (in seconds) that it took to execute.
  """
  import time
  tic = time.time()
  f(*args)
  toc = time.time()
  return toc - tic

  Call a function f with args and return the time (in seconds) that it took to execute.
  
Call a function f with args and return the time (in seconds) that it took to execute.
Call a function f with args and return the time ( in seconds ) that it took to execute .
def time_function(f, *args):
  import time
  tic = time.time()
  f(*args)
  toc = time.time()
  return toc - tic
def time_function ( f , * args ) : import time tic = time . time ( ) f ( * args ) toc = time . time ( ) return toc - tic
Call a function f with args and return the time (in seconds) that it took to execute.
Call a function f with args and return the time ( in seconds ) that it took to execute .
"""
  Call a function f with args and return the time (in seconds) that it took to execute.
  """
f