0
我一直在试图运行吨如何从蟒蛇的gensim库使用word2vec一个例子,但我不断收到此错误使用a.all()或a.any()错误,而试图使用gensim word2vec
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
这是我的代码,它只是一个简单的例子:
from gensim.models import Word2Vec
sentences = [['first', 'sentence'], ['second', 'sentence']]
# train word2vec on the two sentences
model = Word2Vec(sentences, min_count=1)
注:我确信,gensim安装其所有的依赖关系。
感谢您的回答,我有点想通OU也是。问题出自python-dev安装。 – Amani