bab2min / tomotopy

Python package of Tomoto, the Topic Modeling Tool
https://bab2min.github.io/tomotopy
MIT License
548 stars 62 forks source link

Error: 'y' must be an iterable of float #154

Closed abhishekrathi09 closed 1 year ago

abhishekrathi09 commented 2 years ago

With SLDAmodel method add_doc(self, words, y=[]) y must be Iterable[float]

I have tried with pandas Series, list and array of float type but receiving error Error: 'y' must be an iterable of float

when I am printing this in for loop, it is working. but not working with below code.

for d,t in zip(docs_train,y_train):
    SLDA_model.add_doc(d,y=t)
bab2min commented 2 years ago

Hi @abhishekrathi09 Could you share more detail about your situation? I think the type of docs_train and y_train matters. It would be helpful to solve the problem if you give a small example for docs_train and y_train.