| 537 | } |
| 538 | |
| 539 | py::UniqueObj LDAModelObject::getHash() const |
| 540 | { |
| 541 | auto* inst = getInst<tomoto::ILDAModel>(); |
| 542 | std::array<uint64_t, 2> hash = inst->getHash(); |
| 543 | return py::UniqueObj{ PyObject_CallMethod((PyObject*)&PyLong_Type, "from_bytes", "y#s", (const char*)hash.data(), sizeof(hash), "big") }; |
| 544 | } |
| 545 | |
| 546 | py::UniquePObj<LDAModelObject> LDAModelObject::copy(PyObject* cls) const |
| 547 | { |