Open andsor opened 8 years ago
import numpy as np from simkernel import Experiment def sim(): return True xp = Experiment(sim) res = xp(repeat=3) np.testing.assert_array_equal(res, [True, True, True])
This is trivial (and dumb) for deterministic functions, but is useful for experiments that measure computation time (cf. timeit) or for simple stochastic experiments (without the need for Common Random Numbers).