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

Function get_node_ids

graphlearn/python/c/py_wrapper.h:151–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151PyObject* get_node_ids(GetNodesResponse* res) {
152 npy_intp shape[1];
153 shape[0] = res->Size();
154 PyArray_Descr* descr = PyArray_DescrFromType(NPY_INT64);
155 PyObject* obj = PyArray_Zeros(1, shape, descr, 0);
156 PyArrayObject* np_array = reinterpret_cast<PyArrayObject*>(obj);
157 memcpy(PyArray_DATA(np_array), res->NodeIds(),
158 res->Size() * INT64_BYTES);
159 return obj;
160}
161
162LookupNodesRequest* new_lookup_nodes_request(
163 const std::string& node_type) {

Callers 1

init_client_moduleFunction · 0.85

Calls 2

SizeMethod · 0.45
NodeIdsMethod · 0.45

Tested by

no test coverage detected