comet_maths.linear_algebra.matrix_conversion.expand_errcorr_dims#
- comet_maths.linear_algebra.matrix_conversion.expand_errcorr_dims(in_corr: ndarray, in_dim: str | List[str], out_dim: List[str], dim_sizes: dict) ndarray [source]#
Function to expand the provided correlation matrix (which defines the correlation along 1 or more dimensions), to higher dimensions, so that the total correlation matrix can be calculated.
- Parameters:
in_corr – correlation matrix along the dimensions specified in in_dim
in_dim – list of dimensions of the input correlation matrix
out_dim – list of dimensions of the expanded matrix
dim_sizes – dictionary with the dimensions of each of the dimensions
- Returns:
correlation matrix contribution to the full correlation matrix