

def __getitem__(self, n):
    "Return a dict of neighbors of node n.  Use the expression 'G[n]'.\n\n        Parameters\n        ----------\n        n : node\n           A node in the graph.\n\n        Returns\n        -------\n        adj_dict : dictionary\n           The adjacency dictionary for nodes connected to n.\n\n        Notes\n        -----\n        G[n] is similar to G.neighbors(n) but the internal data dictionary\n        is returned instead of a list.\n\n        Assigning G[n] will corrupt the internal graph data structure.\n        Use G[n] for reading data only.\n\n        Examples\n        --------\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_path([0,1,2,3])\n        >>> G[0]\n        {1: {}}\n        "
    return self.adj[n]

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingGraph.__getitem__/original