baybe.utils.dataframe.arrays_to_dataframes¶
- baybe.utils.dataframe.arrays_to_dataframes(input_labels: Sequence[str], output_labels: Sequence[str], /, use_torch: bool = False)[source]¶
Make a decorator for labeling the input/output columns of array-based callables.
Useful for creating parameter-to-target lookups from array-based logic. The decorator transforms a callable designed to work with unlabelled arrays such that it can operate with dataframes instead. The original callable is expected to accept and return two-dimensional arrays. When decorated, the callable accepts and returns dataframes whose columns are mapped to the corresponding arrays based on the specified label sequences.