pymks/stats.py
def _mask_X_(X_, confidence_index):
    """
    Helper function to verify that the confidence_index is the correct
    shape.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        confidence_index: array with same shape as X used to assign a
            confidence value for each data point.

    Returns:
        The discretized microstructure function scaled by the confidence_index.

    """
    if confidence_index is not None:
        if X_.shape[:-1] != confidence_index.shape:
            raise RuntimeError('confidence_index does not match shape of X')
        X_ = X_ * confidence_index[..., None]
    return X_

    Helper function to verify that the confidence_index is the correct
    shape.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        confidence_index: array with same shape as X used to assign a
            confidence value for each data point.

    Returns:
        The discretized microstructure function scaled by the confidence_index.

    
Helper function to verify that the confidence_index is the correct
shape.
Helper function to verify that the confidence_index is the correct shape .
def _mask_X_(X_, confidence_index):
    if confidence_index is not None:
        if X_.shape[:-1] != confidence_index.shape:
            raise RuntimeError('confidence_index does not match shape of X')
        X_ = X_ * confidence_index[..., None]
    return X_
def _mask_X_ ( X_ , confidence_index ) : if confidence_index is not None : if X_ . shape [ : - 1 ] != confidence_index . shape : raise RuntimeError ( 'confidence_index does not match shape of X' ) X_ = X_ * confidence_index [ ... , None ] return X_
Helper function to verify that the confidence_index is the correct
shape.
Helper function to verify that the confidence_index is the correct shape .
"""
    Helper function to verify that the confidence_index is the correct
    shape.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        confidence_index: array with same shape as X used to assign a
            confidence value for each data point.

    Returns:
        The discretized microstructure function scaled by the confidence_index.

    """
The discretized microstructure function scaled by the confidence_index.
The discretized microstructure function scaled by the confidence_index .
X_
confidence_index
array with same shape as X used to assign a
confidence value for each data point.
array with same shape as X used to assign a confidence value for each data point .
`X_`
The discretized microstructure function, an
`(n_samples, n_x, ..., n_states)` shaped array
where `n_samples` is the number of samples, `n_x` is thes
patial discretization, and n_states is the number of local states.
The discretized microstructure function an ` ( n_samples n_x ... n_states ) ` shaped array where ` n_samples ` is the number of samples ` n_x ` is thes patial discretization and n_states is the number of local states .