예제 #1
0
 def testVecMatIndexConversion(self):
     """
     Superoperator: Conversion between matrix and vector indices
     """
     N = 10
     for I in range(N * N):
         i, j = vec2mat_index(N, I)
         I2 = mat2vec_index(N, i, j)
         assert_(I == I2)
예제 #2
0
 def testVecMatIndexConversion(self):
     """
     Superoperator: Conversion between matrix and vector indices
     """
     N = 10
     for I in range(N * N):
         i, j = vec2mat_index(N, I)
         I2 = mat2vec_index(N, i, j)
         assert_(I == I2)