Example #1
0
 def test_known_incompatable(self):
     shape1 = (3, 3)
     shape2 = (3, 1, 3)
     self.assertFalse(array_connection_compatible(shape1, shape2))
Example #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))
Example #3
0
 def test_matrix_to_vectorized_matrix(self):
     shape1 = (3, 3)
     shape2 = (1, 3, 3)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Example #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))
Example #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))
Example #6
0
 def test_known_incompatable(self):
     shape1 = (3, 3)
     shape2 = (3, 1, 3)
     self.assertFalse(array_connection_compatible(shape1, shape2))
Example #7
0
 def test_matrix_to_vectorized_matrix(self):
     shape1 = (3, 3)
     shape2 = (1, 3, 3)
     self.assertTrue(array_connection_compatible(shape1, shape2))
Example #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))