#NEWLINE# @ staticmethod #NEWLINE# def clean( conn , labels = None , group = None ) : #NEWLINE# #INDENT# "\n        Visualize a sparse adjacency matrix.\n\n        .. image:: adjacency.png\n\n        Parameters\n        ----------\n        conn : array-like, (n,n) or (n,3) or (n,2)\n            Input connectivity data as either a matrix or a list of links.\n            Matrix can be binary or continuous valued. Links should contain\n            either 2 elements per link (source, target),\n            or 3 elements (source, target, value).\n\n        labels : array-like, (n,)\n            Text labels for each item (will label rows and columns)\n\n        group : array-like, optional, singleton or (n,)\n            Single integer or array to set colors via groups\n\n        sort : str, optional, default='group'\n            What to sort by, options are 'group' | 'degree'\n\n        numbers : boolean, optional, default=False\n            Whether to show numbers on cells\n\n        symmetric : boolean, optional, default=True\n            Whether to make links symmetrical\n        " #NEWLINE# links = parse_links ( conn ) #NEWLINE# nodes = parse_nodes ( conn ) #NEWLINE# outdict = { #NEWLINE# #INDENT# 'links' : links , #NEWLINE# 'nodes' : nodes , #NEWLINE# #UNINDENT# } #NEWLINE# outdict = add_property ( outdict , labels , 'labels' ) #NEWLINE# outdict = add_property ( outdict , group , 'group' ) #NEWLINE# return outdict