Skip to content

Utility functions

utils

Utility functions.

multichaos.utils.cartesian_product

cartesian_product(*arrays)

Compute the Cartesian product of input arrays.

Parameters:

Name Type Description Default
*arrays list[np.ndarray]

Input arrays.

()

Returns:

Type Description
np.ndarray

Cartesian product of input arrays.

multichaos.utils.aggregate_coefficients

aggregate_coefficients(level_estimators: list[single_level.PCE]) -> tuple[np.ndarray, np.ndarray]

Aggregate coefficients from a list of level estimators.

Parameters:

Name Type Description Default
level_estimators list[single_level.PCE]

List of level estimators.

required