xarray_lmfit.load_fit#
- xarray_lmfit.load_fit(path, funcdefs=None, **kwargs)#
Load fit results from a netCDF file.
This function loads a dataset from a netCDF file and deserializes any
lmfit.model.ModelResultobjects that were saved.The deserialization is performed just like
lmfit.model.load_modelresult(), and shares the same limitations.- Parameters:
path – Path to the netCDF file to load.
funcdefs (
dict, optional) – Dictionary of functions to use when deserializing the fit results. Seelmfit.model.load_modelresult()for more information.**kwargs – Additional keyword arguments that are passed to
xarray.load_dataset().
- Returns:
The dataset containing the fit results.
- Return type:
Note
Storing fit results to a file for an extended period of time is not recommended, as the serialization format does not guarantee compatibility between different versions of python or packages. For more information, see the lmfit documentation.
See also
save_fitSave fit results to a netCDF file.