Constructing a DataGenerator can be quite complex, so in order to improve the usability, it would be great if there was a way to convert the simplest of python functions (e.g. number of arbitraty arguments, number of arbitrary returns) to a DataGenerator object with a helper function:
For example:
def f(x, s):
return x + s
... where for example x is a parametrized parameter that can be handled by ExperimentSample and s is a parameter that is always given to this function (let's say s=103).
Problem
Constructing a
DataGenerator
can be quite complex, so in order to improve the usability, it would be great if there was a way to convert the simplest of python functions (e.g. number of arbitraty arguments, number of arbitrary returns) to a DataGenerator object with a helper function:For example:
... where for example
x
is a parametrized parameter that can be handled byExperimentSample
ands
is a parameter that is always given to this function (let's says=103
).Possible solution
The function should look something like this:
The returned object is a
f3dasm.DataGenerator
that can be used in combination withexperiment_data.evaluate()