我有一个包含九个文档的文档术语矩阵:
我正在运行代码如下:
import pyLDAvis.gensim
topicData = pyLDAvis.gensim.prepare(ldamodel, docTermMatrix, dictionary)
pyLDAvis.display(topicData)
Run Code Online (Sandbox Code Playgroud)
执行 pyLDAvis.display 函数时出现以下错误:
类型错误:“复杂”类型的对象不是 JSON 可序列化的
有人可以在这里指导吗?可能是什么原因?