Skip to content

Commit

Permalink
fixed #136
Browse files Browse the repository at this point in the history
  • Loading branch information
bab2min committed Sep 1, 2021
1 parent 2289df4 commit 78ab9f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python/py_PT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ static int PT_init(TopicModelObject *self, PyObject *args, PyObject *kwargs)
[=]() { return "`alpha` must be an instance of `float` or `List[float]` with length `k` (given " + py::repr(objAlpha) + ")"; }
);

if (margs.p == 0) margs.p = margs.k * 10;

tomoto::ITopicModel* inst = tomoto::IPTModel::create((tomoto::TermWeight)tw, margs);
if (!inst) throw py::ValueError{ "unknown `tw` value" };
self->inst = inst;
Expand Down

0 comments on commit 78ab9f7

Please sign in to comment.