def info_dict(H, obj=None):
    """
    Create a summary of simple statistics for H

    Parameters
    ----------
    H : Hypergraph
    obj : optional
        either a node or edge uid from the hypergraph  

    Returns
    -------
     info_dict : dict
        Returns a dictionary of statistics of the size, 
        aspect ratio, and density of the hypergraph. 

    """
    report = dict()
    if not H.edges.elements:
        return {}
    if obj:
        if obj in H.nodes:
            membs = list(H.nodes[obj].memberships)
            report['degree'] = len(membs)
        if obj in H.edges:
            report['size'] = H.edges[obj].size()
    else:
        lnodes = len(H.nodes)
        ledges = len(H.edges)
        M = H.incidence_matrix(index=False)
        ncells = M.nnz
        report['nrows'] = lnodes
        report['ncols'] = ledges
        report['aspect ratio'] = lnodes / ledges
        report['ncells'] = ncells
        report['density'] = ncells / (lnodes * ledges)
    return report
