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)#

Converts a function taking two independent variables and parameters to a format usable with curve_fit, by flattening the model by the second dimension.

Parameters:
  • model (Callable) – the original function taking x, y independent variables

  • cloned_arguments_indices (None | Sequence[int]) – the 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 extended parameter list of the original model

Return type:

Callable