def dotdot(adj, vec1, vec2):
    """Computes the dot product of a matrix with two vectors

    Parameters
    ----------
    adj : Numpy Matrix or SciPy sparse matrix (csr or csc)
        The N x N Adjacency matrix of the graph of interest.
    vec1 : first Numpy array
    vec2 : second Numpy array

    Returns
    -------
    scalar (float, int, boolean, etc.)
        Resulting scalar of dot product

    """
    return ((((adj).dot(vec1)).dot(vec2)))