This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / signal / _signaltools / _timeit_fast

function

scipy.signal._signaltools:_timeit_fast

source: build-install/usr/lib/python3.14/site-packages/scipy/signal/_signaltools.py:1217

Signature

def _timeit_fast(stmt = pass, setup = pass, repeat = 3)

Summary

Returns the time the statement/function took, in seconds.

Extended Summary

Faster, less precise version of IPython's timeit. stmt can be a statement written as a string or a callable.

Will do only 1 loop (like IPython's timeit) with no repetitions (unlike IPython) for very slow functions. For fast functions, only does enough loops to take 5 ms, which seems to produce similar results (on Windows at least), and avoids doing an extraneous cycle that isn't measured.

Aliases

  • scipy.signal._signaltools._timeit_fast