Beispiel #1
0
 def test_known_incompatable(self):
     shape1 = (3, 3)
     shape2 = (3, 1, 3)
     self.assertFalse(array_connection_compatible(shape1, shape2))
Beispiel #2
0
 def test_ones_to_one(self):
     shape1 = (1, 1, 1, 1, 1, 1, 1, 1)
     shape2 = (1, )
     self.assertTrue(array_connection_compatible(shape1, shape2))
Beispiel #3
0
 def test_matrix_to_vectorized_matrix(self):
     shape1 = (3, 3)
     shape2 = (1, 3, 3)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Beispiel #4
0
 def test_ones_at_end(self):
     shape1 = (15, 3, 1, 7, 1, 1, 1, 1)
     shape2 = (1, 15, 3, 1, 7)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Beispiel #5
0
 def test_ones_at_both_ends(self):
     shape1 = (1, 1, 15, 3, 1, 7, 1, 1, 1, 1)
     shape2 = (1, 15, 3, 1, 7)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Beispiel #6
0
 def test_known_incompatable(self):
     shape1 = (3, 3)
     shape2 = (3, 1, 3)
     self.assertFalse(array_connection_compatible(shape1, shape2))
Beispiel #7
0
 def test_matrix_to_vectorized_matrix(self):
     shape1 = (3, 3)
     shape2 = (1, 3, 3)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Beispiel #8
0
 def test_ones_to_one(self):
     shape1 = (1, 1, 1, 1, 1, 1, 1, 1)
     shape2 = (1,)
     self.assertTrue(array_connection_compatible(shape1, shape2))