def number_nodes(A):
    """return the number of nodes of a graph

    Parameters
    ----------
    A : ndarray, shape(n, n)
        Adjacency matrix of the graph.

    Returns
    -------
    n_nodes : integer
        Number of nodes.

    Examples
    --------
    >>> A = get_graph()
    >>> print number_nodes(A)
    31
    >>> # which is the same as
    >>> print A.shape[0]
    31
    """
    return A.shape[0]