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

Method edge_attributes

graphlearn/python/graph.py:334–346  ·  view source on GitHub ↗
(self, edge_type, attrs, n_int, n_float, n_string)

Source from the content-addressed store, hash-verified

332 return result
333
334 def edge_attributes(self, edge_type, attrs, n_int, n_float, n_string):
335 edge_source = None
336 for edge in self._edge_sources:
337 if edge.edge_type == edge_type:
338 edge_source = edge
339 break
340 if edge_source is None:
341 raise ValueError('edge type "%s" doesn\'t exist.' % (edge_type,))
342 edge_source.use_attrs = ';'.join(attrs)
343 decoder = self._edge_decoders[edge_type]
344 self._edge_decoders[edge_type] = self._make_vineyard_decoder(
345 decoder.weighted, decoder.labeled, n_int, n_float, n_string)
346 return self
347
348 @property
349 def undirected_edges(self):

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80

Tested by

no test coverage detected