| 342 | } |
| 343 | |
| 344 | PyObject* get_edge_labels(LookupEdgesResponse* res) { |
| 345 | npy_intp shape[1]; |
| 346 | shape[0] = res->Size(); |
| 347 | PyArray_Descr* descr = PyArray_DescrFromType(NPY_INT32); |
| 348 | PyObject* obj = PyArray_Zeros(1, shape, descr, 0); |
| 349 | PyArrayObject* np_array = reinterpret_cast<PyArrayObject*>(obj); |
| 350 | memcpy(PyArray_DATA(np_array), res->Labels(), |
| 351 | res->Size() * INT32_BYTES); |
| 352 | return obj; |
| 353 | } |
| 354 | |
| 355 | PyObject* get_edge_int_attributes(LookupEdgesResponse* res) { |
| 356 | return get_int_attributes(res); |
no test coverage detected