1
0

Add distributed computing for negation and addition (no memory distributing)

This commit is contained in:
2024-04-08 00:26:20 +02:00
parent c0908b4299
commit e6a9d5a2f0
3 changed files with 119 additions and 11 deletions

View File

@ -378,3 +378,12 @@ class TestMatrix(TestCase):
expected = Matrix([1, 2, 3, 4, 5, 60, 70, 8, 9, 100, 110, 12, 13, 14, 15, 16], (4, 4))
self.assertEqual(expected, actual)
def test_should_flatten_list_of_matrices(self):
m1 = Matrix([1, 2, 3, 4, 5, 6, 7, 8, 9], (3, 3))
m2 = Matrix([1, 2, 3, 4, 5, 6], (2, 3))
actual = m1.flatten([m1, m2])
expected = Matrix([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6], (5, 3))
self.assertEqual(expected, actual)