| 189 | } |
| 190 | |
| 191 | PyObject* get_node_labels(LookupNodesResponse* res) { |
| 192 | npy_intp shape[1]; |
| 193 | shape[0] = res->Size(); |
| 194 | PyArray_Descr* descr = PyArray_DescrFromType(NPY_INT32); |
| 195 | PyObject* obj = PyArray_Zeros(1, shape, descr, 0); |
| 196 | PyArrayObject* np_array = reinterpret_cast<PyArrayObject*>(obj); |
| 197 | memcpy(PyArray_DATA(np_array), res->Labels(), |
| 198 | res->Size() * INT32_BYTES); |
| 199 | return obj; |
| 200 | } |
| 201 | |
| 202 | PyObject* get_int_attributes(LookupResponse* res) { |
| 203 | int32_t attr_num = res->IntAttrNum(); |
no test coverage detected