pymodelfit.core.list_models

pymodelfit.core.list_models(include=None, exclude=None, baseclass=None, showabstract=False)[source]

Lists the registered model objects in the package, possibly subject to constraints.

Parameters:
  • include (sequence of strings or None) – A sequence of model names or class objects for which to include names in the list (e.g. strings will just be validated as correct model names).
  • exclude (sequence of strings or None) – A sequence of model names that should be excluded.
  • baseclass (a class or None) – If not None, all models that are not subclasses of this class will be filtered out of the results.
  • showabstract (bool) – If True, models that have abstract class objects will be included. Otherwise, they will not appear in the list.
Returns:

A list of strings for the models that can be used with get_model_class() or get_model_instance().

Raises:
  • ValueError – if any provided model strings are not in the registry
  • TypeError – if both include and exclude are not None

See the register_model() docstring for examples.

Previous topic

pymodelfit.core.register_model

Next topic

pymodelfit.core.get_model_class

This Page