utils module

This section contains the Python API reference for the uncertainty_toolbox.utils module, which contains code for various utilities that are used within Uncertainty Toolbox.

uncertainty_toolbox.utils Module

Util functions for the toolbox.

uncertainty_toolbox.utils.assert_is_flat_same_shape(*args)

Check if inputs are all same-length 1d numpy.ndarray.

Parameters

args (Any) – the numpy arrays to check.

Return type

Union[bool, NoReturn]

Returns

True if all arrays are flat and the same shape, or else raises assertion error.

uncertainty_toolbox.utils.assert_is_positive(*args)

Assert that all numpy arrays are positive.

Parameters

args (Any) – the numpy arrays to check.

Return type

Union[bool, NoReturn]

Returns

True if all elements in all arrays are positive values, or else raises assertion error.