예제 #1
0
 def test_zeroes(self):
     for N in range(4):
         a = naivearr.array(N, N, N)
         for i in range(N):
             for j in range(N):
                 for k in range(N):
                     self.assertEqual(a[i][j][k], 0)
예제 #2
0
 def test_zeroes(self):
     for N in range(4):
         a = naivearr.array(N, N, N)
         for i in range(N):
             for j in range(N):
                 for k in range(N):
                     self.assertEqual(a[i][j][k], 0)
예제 #3
0
 def test_identity(self):
     for N in range(4):
         a = naivearr.array(N, N, N)
         for i in range(N):
             a[i][i][i] = 1
         for i in range(N):
             for j in range(N):
                 for k in range(N):
                     self.assertEqual(a[i][j][k], i == j == k)
예제 #4
0
 def test_identity(self):
     for N in range(4):
         a = naivearr.array(N, N, N)
         for i in range(N):
             a[i][i][i] = 1
         for i in range(N):
             for j in range(N):
                 for k in range(N):
                     self.assertEqual(a[i][j][k], i==j==k)