MCPcopy Create free account
hub / github.com/Tencent/embedx / get_node_feature_str

Method get_node_feature_str

demo/data/scripts/embedx_graph.py:62–68  ·  view source on GitHub ↗
(cls, node)

Source from the content-addressed store, hash-verified

60
61 @classmethod
62 def get_node_feature_str(cls, node):
63 if not node.has_feature():
64 return ""
65
66 valid_feature_str = " ".join(
67 [f"{i}:{feat}" for i, feat in enumerate(node.valid_feature) if feat != 0])
68 return f"{node.node_id} {valid_feature_str}"
69
70 @classmethod
71 def get_node_label_str(cls, node):

Callers 1

write_node_featureMethod · 0.80

Calls 1

has_featureMethod · 0.80

Tested by

no test coverage detected