class probnum._config.Configuration[source]

Bases: object

Configuration over which some mechanics of ProbNum can be controlled dynamically.

ProbNum provides some configurations together with default values. These are listed in the tables below. Additionally, users can register their own configuration entries via register(). Configuration entries can only be registered once and can only be used (accessed or overwritten) once they have been registered.

Config Option

Default Value


covariance_inversion_damping 1e-12

A (typically small) value that is per default added to the diagonal of covariance matrices in order to make inversion numerically stable.

lazy_linalg False

If True, wherever possible, LinearOperators are used instead of Numpy arrays. LinearOperators provide lazy arithmetic and thus memory- and runtime-efficient linear algebra operations.


>>> import probnum
>>> probnum.config.covariance_inversion_damping
>>> with probnum.config(
...     covariance_inversion_damping=1e-2,
... ):
...     probnum.config.covariance_inversion_damping

Methods Summary


Context manager used to set values of registered config options.

register(key, default_value, description)

Register a new configuration option.

Methods Documentation


Context manager used to set values of registered config options.

Return type


register(key, default_value, description)[source]

Register a new configuration option.

  • key (str) – The name of the configuration option. This will be the key when calling with config(key=<some_value>): ....

  • default_value (Any) – The default value of the configuration option.

  • description (str) – A short description of the configuration option and what it controls.

Return type