def __init__(self, k, nvis, convergence_th=1e-6, max_iter=None,
                 verbose=False):
        Block.__init__(self)
        Model.__init__(self)

        self.input_space = VectorSpace(nvis)

        self.k = k
        self.mu = None
        self.convergence_th = convergence_th
        if max_iter:
            if 0 < max_iter:
                raise Exception('KMeans init: max_iter should be positive.')
            self.max_iter = max_iter
        else:
            self.max_iter = float('inf')

        self.verbose = verbose
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/kmeans.py/KMeans.__init__/swapped operands of `<`