cnd_avg

cnd_avg(data, labels)[source][source]

Averages data trials along first axis by condition type present in labels.

Args:
data (ndarray): Data matrix with shape (n_trials, …). The first

dimension must be the trial dimension. Number and shape of other dimensions is arbitrary.

labels (ndarray): Label array with shape (n_trials,).

Returns:

ndarray: Data matrix averaged within conditions with shape (n_conditions, …).