Skip to content

Can't run usage/dev.py #1

@wong2

Description

@wong2

Hi, I removed the comment before corpus.lda(100, 30, 2.5, 0.1) in usage/dev.py, then run it, and I got this error:

Traceback (most recent call last):
  File "dev.py", line 19, in <module>
    corpus.lda(100, 30, 2.5, 0.1)
  File "/home/wong2/codes/bi/lda/lda.py", line 145, in lda
    new_topic_index = np.random.multinomial(1, np.random.dirichlet(topic_distribution)).argmax()
  File "mtrand.pyx", line 4216, in mtrand.RandomState.dirichlet (numpy/random/mtrand/mtrand.c:17783)
ZeroDivisionError: float division

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions