| 230 | } |
| 231 | |
| 232 | py::UniqueObj DocumentObject::getY() const |
| 233 | { |
| 234 | if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `" "y" "` field!" }; |
| 235 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 236 | if (auto ret = docVisit<tomoto::DocumentSLDA>(getBoundDoc(), [](auto* doc) |
| 237 | { |
| 238 | return py::buildPyValue(doc->y); |
| 239 | })) return ret; |
| 240 | throw py::AttributeError{ "doc has no `" "y" "` field!" }; |
| 241 | } |
nothing calls this directly
no test coverage detected