ffb9bab9595bebf625c01d58a8be77932e00a8f6,gensim/models/word2vec.py,Word2Vec,__getitem__,#Word2Vec#Any#,1119

Before Change


                    mean.append(self.syn0norm[self.vocab[w].index])
                else:
                    raise KeyError("word "%s" not in vocabulary" % w)
            mean = matutils.unitvec(array(mean).mean(axis=0)).astype(REAL)
            return mean
        else:
            return self.syn0[self.vocab[word].index]

After Change


          array([ -1.40128313e-02, ...]

        
        return array([self.syn0[self.vocab[word].index] for word in words])


    def __contains__(self, word):
        return word in self.vocab
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: ffb9bab9595bebf625c01d58a8be77932e00a8f6
Time: 2015-07-12
Author: tpsatish95@gmail.com
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: __getitem__


Project Name: brainiak/brainiak
Commit Name: 408f12dec2ff56559a26873a848a09e4c8facfeb
Time: 2019-04-19
Author: sam.nastase@gmail.com
File Name: brainiak/isc.py
Class Name:
Method Name: isc


Project Name: MLWave/kepler-mapper
Commit Name: eb3443d8d4f24005d7dac4320b82917a2f455728
Time: 2020-08-06
Author: gabriel.altay@gmail.com
File Name: kmapper/visuals.py
Class Name:
Method Name: _format_cluster_statistics