MCPcopy Create free account
hub / github.com/alibaba/GraphScope / process_label

Function process_label

python/graphscope/framework/graph_utils.py:379–395  ·  view source on GitHub ↗
(label, items)

Source from the content-addressed store, hash-verified

377 raise SyntaxError("Wrong format of e sub label: " + str(items))
378
379 def process_label(label, items):
380 e_label = EdgeLabel(label, id_type)
381 if isinstance(items, (Loader, str, pd.DataFrame, *VineyardObjectTypes)):
382 e_label.add_sub_label(process_sub_label(items))
383 elif isinstance(items, Sequence):
384 if isinstance(
385 items[0], (Loader, str, pd.DataFrame, *VineyardObjectTypes, np.ndarray)
386 ):
387 e_label.add_sub_label(process_sub_label(items))
388 else:
389 for item in items:
390 e_label.add_sub_label(process_sub_label(item))
391 elif isinstance(items, Mapping):
392 e_label.add_sub_label(process_sub_label(items))
393 else:
394 raise SyntaxError("Wrong format of e label: " + str(items))
395 return e_label
396
397 e_labels = []
398 if edges is None:

Callers 2

Calls 6

add_sub_labelMethod · 0.95
check_argumentFunction · 0.90
process_sub_labelFunction · 0.85
EdgeLabelClass · 0.70
VertexLabelClass · 0.70
popMethod · 0.45

Tested by

no test coverage detected