| 67 | } |
| 68 | |
| 69 | py::UniqueObj DocumentObject::getBeta() const |
| 70 | { |
| 71 | if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `beta` field!" }; |
| 72 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 73 | |
| 74 | if (auto ret = docVisit<tomoto::DocumentCTM>(getBoundDoc(), [](auto* doc) |
| 75 | { |
| 76 | return py::buildPyValueTransform( |
| 77 | doc->smBeta.data(), doc->smBeta.data() + doc->smBeta.size(), |
| 78 | logf |
| 79 | ); |
| 80 | })) return ret; |
| 81 | throw py::AttributeError{ "doc has no `beta` field!" }; |
| 82 | } |
nothing calls this directly
no test coverage detected