Skip to content

Runtime error #55

@Glisho

Description

@Glisho

So, I iterated over a number of files in a folder and suddenly the program stopped and showed the following message. What is happening and what should I do?

Thank you in advance.

/home/gligur/.local/lib/python3.6/site-packages/wmd/__init__.py:668: RuntimeWarning: invalid value encountered in true_divide
  w /= w.sum()
wmd: weights are not normalized: 0 != 1000000000
[10:38:02] or-tools/src/graph/min_cost_flow.cc:1097: Max flow could not be computed.
wmd: status is 5
Traceback (most recent call last):
  File "/home/gligur/PycharmProjects/gligurtest/TopicClustering.py", line 26, in <module>
    array[i] = doc1.similarity(doc2)
  File "doc.pyx", line 370, in spacy.tokens.doc.Doc.similarity
  File "/home/gligur/.local/lib/python3.6/site-packages/wmd/__init__.py", line 652, in compute_similarity
    return libwmdrelax.emd(w1, w2, dists)
RuntimeError: negative cost was returned

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions