iqm.cpc.core.dataset.convert_2d_model

iqm.cpc.core.dataset.convert_2d_model#

iqm.cpc.core.dataset.convert_2d_model(model, cloned_arguments_indices=None)#

Convert a function to a format usable with curve_fit, by flattening the model by the second dimension.

Parameters:
  • model (Callable[[...], ndarray]) – Original function taking the x, y independent variables, and variadic args.

  • cloned_arguments_indices (None | Sequence[int]) – Indices of the arguments we would like to clone in the list of all the arguments of the original model.

Returns:

The new model function, taking x, y, y_indices, and variadic args of the original model.

Return type:

Callable[[…], ndarray]