def _add_examples(self, examples, iterations):
        """Adds examples to the internal state of the classifier, assigns
        random initial labels to only the added docs, and runs Gibbs sampling
        for iterations number of iterations.
        """
        if len(examples) == 0:
            return

        docs, labels_list = self._parse_examples(examples)

        last_num_labels = self._num_labels
        last_num_docs = self._num_docs
        last_num_words = self._num_words

        # Increments _num_labels with any new labels
        for labels in labels_list:
            for label in labels:
                self._get_label_id(label)
        self._num_docs += len(docs)

        self._b_dl = numpy.concatenate(
            (self._b_dl, numpy.zeros(
                (last_num_docs, last_num_labels - self._num_labels),
                dtype=int)), axis=1)
        self._b_dl = numpy.concatenate(
            (self._b_dl, [
                self._get_label_vector(labels) for labels in labels_list
            ]), axis=0)
        self._w_dp.extend([map(self._get_word_id, doc) for doc in docs])
        self._c_dl = numpy.concatenate(
            (self._c_dl, numpy.zeros(
                (last_num_docs, self._num_labels - last_num_labels),
                dtype=int)), axis=1)
        self._c_dl = numpy.concatenate(
            (self._c_dl, numpy.zeros(
                (self._num_docs - last_num_docs, self._num_labels),
                dtype=int)), axis=0)
        self._c_lw = numpy.concatenate(
            (self._c_lw, numpy.zeros(
                (last_num_labels, self._num_words - last_num_words),
                dtype=int)), axis=1)
        self._c_lw = numpy.concatenate(
            (self._c_lw, numpy.zeros(
                (self._num_labels - last_num_labels, self._num_words),
                dtype=int)), axis=0)
        self._c_l = numpy.concatenate(
            (self._c_l, numpy.zeros(
                self._num_labels - last_num_labels, dtype=int)))

        for d in xrange(last_num_docs, self._num_docs):
            doc, _ = self._get_doc_with_label_vector(d)
            l_p = numpy.random.random_integers(
                0, self._num_labels - 1, size=len(doc)).tolist()
            self._l_dp.append(l_p)
            for w, l in zip(doc, l_p):
                self._increment_counting_matrices(d, w, l)
            self._iterate_gibbs_sampling(iterations, [d])

        return xrange(last_num_docs, self._num_docs)
dataset/ETHPy150Open oppia/oppia/core/domain/classifier_services.py/StringClassifier._add_examples/swapped operands of `-`