def _class_means(X, y):
    means = []
    classes = np.unique(y)
    for group in classes:
        Xg = X[y == group, :]
        means.append(Xg.mean(0))
    return np.asarray(means)
This method must contain the core animation logic and should also
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/discriminant_analysis.py/_class_means--crossover with--dataset/ETHPy150Open GelaniNijraj/PyMaterial/MAnimations/MAnimator.py/MAnimator.animate