Skip to content

Commit

Permalink
Fix #268
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeBroggi committed Jun 20, 2024
1 parent 36af2ce commit 98ffe9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/003_datageneration/001_own_datagenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def y(x):
#
# In order to create an :class:`~f3dasm.ExperimentData` object, we have to first create a domain
domain = Domain()
domain.add_float('x', low=0., high=100.)
domain.add_float(name='x', low=0., high=100.)

# Note that the number of input variable ant its name match the function :func:`y(x)`.

###############################################################################
# For demonstration purposes, we will generate a dataset of stopping distances for velocities between 3 and 83 m/s.
Expand Down
6 changes: 4 additions & 2 deletions src/f3dasm/_src/experimentdata/experimentdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ def mark_all_nan_open(self) -> None:
# Datageneration
# =========================================================================

def evaluate(self, data_generator: DataGenerator,
def evaluate(self, data_generator: DataGenerator | Callable,
mode: Literal['sequential', 'parallel',
'cluster', 'cluster_parallel'] = 'sequential',
kwargs: Optional[dict] = None,
Expand All @@ -1116,7 +1116,9 @@ def evaluate(self, data_generator: DataGenerator,
Parameters
----------
data_generator : DataGenerator
data generator to use
Data generator to use. If a function is provided, it will be converted to
a data generator and its signature should match the experimental data input
names.
mode : str, optional
operational mode, by default 'sequential'. Choose between:
Expand Down

0 comments on commit 98ffe9b

Please sign in to comment.