mofaflex._core.settings.Settings#

class mofaflex._core.settings.Settings(*, use_dask=True, dask_chunksize_mb=500, eps=1e-08)#

Global settings.

Example

settings.use_dask = True
with settings.override(use_dask=False):
    pass

Attributes table#

use_dask

Whether to use dask where possible to perform operations lazily.

dask_chunksize_mb

Size of Dask array chunks in MiB.

eps

Small epsilon for numerical stability.

Methods table#

get(setting)

Get the current value of a setting.

override(**kwargs)

Context manager to locally override some settings.

set(**kwargs)

Set settings.

Attributes#

Settings.use_dask: bool#

Whether to use dask where possible to perform operations lazily.

Settings.dask_chunksize_mb: float#

Size of Dask array chunks in MiB.

Settings.eps: float#

Small epsilon for numerical stability.

Methods#

Settings.get(setting)#

Get the current value of a setting.

Parameters:

setting (str) – The name of the settings.

Settings.override(**kwargs)#

Context manager to locally override some settings.

Parameters:

**kwargs – Setting names and their values.

Settings.set(**kwargs)#

Set settings.

Parameters:

**kwargs – Setting names and their values.