MCPcopy Create free account
hub / github.com/bab2min/tomotopy / getCountByTopic

Method getCountByTopic

src/python/handler/py_DT.cpp:127–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127py::UniqueObj DTModelObject::getCountByTopic() const
128{
129 auto* inst = getInst<tomoto::IDTModel>();
130 auto l = inst->getCountByTopic();
131
132 int64_t* ptr;
133 auto ret = py::newEmptyArray(ptr, inst->getT(), inst->getK());
134 for (size_t i = 0; i < inst->getT(); ++i)
135 {
136 memcpy(ptr + i * inst->getK(), &l[inst->getK() * i], sizeof(int64_t) * inst->getK());
137 }
138 return ret;
139}
140
141py::UniqueObj DTModelObject::getAlpha() const
142{

Callers 1

getCountByTopicsMethod · 0.45

Calls 2

newEmptyArrayFunction · 0.85
getKMethod · 0.45

Tested by

no test coverage detected