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

Method getLambda

src/python/handler/py_DMR.cpp:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164py::UniqueObj DMRModelObject::getLambda() const
165{
166 auto* inst = getInst<tomoto::IDMRModel>();
167 float* ptr;
168 const size_t fs = inst->getF() * inst->getMdVecSize();
169 auto ret = py::newEmptyArray(ptr, inst->getK(), fs);
170 for (size_t i = 0; i < inst->getK(); ++i)
171 {
172 auto l = inst->getLambdaByTopic(i);
173 memcpy(ptr + i * fs, l.data(), sizeof(float) * fs);
174 }
175 return ret;
176}
177
178py::UniqueObj DMRModelObject::getLambdaV2() const
179{

Callers

nothing calls this directly

Calls 4

newEmptyArrayFunction · 0.85
getLambdaByTopicMethod · 0.80
getKMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected