MCPcopy Create free account
hub / github.com/alibaba/graph-learn / get_node_set

Function get_node_set

graphlearn/python/c/py_wrapper.h:509–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509PyObject* 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
520PyObject* get_row_idx(SubGraphResponse* res) {
521 npy_intp shape[1];

Callers 1

init_client_moduleFunction · 0.85

Calls 2

NodeCountMethod · 0.80
NodeIdsMethod · 0.45

Tested by

no test coverage detected