Edits

1) Updated modularity.py to convert networkx sparse matrices to dense matrices so they can be converted to numpy arrays
2) Added functions to util.py that are needed for certain data structures