| 507 | } |
| 508 | |
| 509 | PyObject* get_node_set(SubGraphResponse* res) { |
| 510 | npy_intp shape[1]; |
| 511 | shape[0] = res->NodeCount(); |
| 512 | PyArray_Descr* descr = PyArray_DescrFromType(NPY_INT64); |
| 513 | PyObject* obj = PyArray_Zeros(1, shape, descr, 0); |
| 514 | PyArrayObject* np_array = reinterpret_cast<PyArrayObject*>(obj); |
| 515 | memcpy(PyArray_DATA(np_array), res->NodeIds(), |
| 516 | res->NodeCount() * INT64_BYTES); |
| 517 | return obj; |
| 518 | } |
| 519 | |
| 520 | PyObject* get_row_idx(SubGraphResponse* res) { |
| 521 | npy_intp shape[1]; |
no test coverage detected