def __getitem__(self, bow):
        # if the input vector is in fact a corpus, return a transformed corpus as result
        is_corpus, bow = utils.is_corpus(bow)
        if is_corpus:
            return self._apply(bow)

        vec = matutils.sparse2full(bow, self.num_terms).reshape(self.num_terms, 1) / numpy.sqrt(self.num_topics)
        vec = numpy.asfortranarray(vec, dtype=numpy.float32)
        topic_dist = numpy.dot(self.projection, vec) # (k, d) * (d, 1) = (k, 1)
        return [(topicid, float(topicvalue)) for topicid, topicvalue in enumerate(topic_dist.flat)
                if numpy.isfinite(topicvalue) and not numpy.allclose(topicvalue, 0.0)]
Return lists of element IDs representing valid envs, as JSON.
dataset/ETHPy150Open largelymfs/topical_word_embeddings/TWE-1/gensim/models/rpmodel.py/RpModel.__getitem__--crossover with--dataset/ETHPy150Open mozilla/moztrap/moztrap/view/runtests/forms.py/EnvironmentSelectionForm.valid_environments_json