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

Function get_edge_labels

graphlearn/python/c/py_wrapper.h:344–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344PyObject* 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
355PyObject* get_edge_int_attributes(LookupEdgesResponse* res) {
356 return get_int_attributes(res);

Callers 1

init_client_moduleFunction · 0.85

Calls 2

LabelsMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected