fixed some double counting when converting from matrices to graphs (in py) to matrices (in js). now have options in both worlds to indicate whether the graph/matrix is directional/triangular or not