Skip to content

Commit

Permalink
added docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvanderschelling committed Nov 18, 2023
1 parent f488cfd commit 0b27c2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/f3dasm/_src/experimentdata/experimentsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ def _store_to_experimentdata(self, object: Any, name: str) -> None:
def _experimentsample_factory(
experiment_sample: np.ndarray | ExperimentSample | Dict) \
-> ExperimentSample:
"""Factory function for the ExperimentSample class.
Parameters
----------
experiment_sample : np.ndarray | ExperimentSample | Dict
The experiment sample to convert to an ExperimentSample.
Returns
-------
ExperimentSample
The converted experiment sample.
"""
if isinstance(experiment_sample, np.ndarray):
return ExperimentSample.from_numpy(experiment_sample)

Expand Down

0 comments on commit 0b27c2d

Please sign in to comment.