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)

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 )
compute class means .