def generateClassificationData(size, nClasses=3):
    """ generate a set of points in 2D belonging to two or three different classes """
    if nClasses==3:
        means = [(-1,0),(2,4),(3,1)]
    else:
        means = [(-2,0),(2,1),(6,0)]

    cov = [diag([1,1]), diag([0.5,1.2]), diag([1.5,0.7])]
    dataset = ClassificationDataSet(2, 1, nb_classes=nClasses)
    for _ in range(size):
        for c in range(3):
            input = multivariate_normal(means[c],cov[c])
            dataset.addSample(input, [nClasses%c])
    dataset.assignClasses()
    return dataset
dataset/ETHPy150Open pybrain/pybrain/examples/supervised/neuralnets+svm/datasets/datagenerator.py/generateClassificationData/swapped operands of `%`