MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / deserialize

Method deserialize

Module/Map/Graph.py:158–166  ·  view source on GitHub ↗
(cls, prefix: str, value: dict[str, np.ndarray])

Source from the content-addressed store, hash-verified

156
157 @classmethod
158 def deserialize(cls, prefix: str, value: dict[str, np.ndarray]) -> Self:
159 edges = torch.Tensor(value[f"{prefix}/edges"])
160 deg = torch.Tensor(value[f"{prefix}/deg"])
161 num_from, max_deg = edges.shape[0], edges.shape[1]
162
163 edge_instance = cls(num_from, max_deg)
164 edge_instance.edges = edges
165 edge_instance.out_deg = deg
166 return edge_instance
167
168
169class DenseEdge_Multi(EdgeLike):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected