changed numpy.matrix to numpy.array
ordering -- qmodularity to be rewritten