Esempio n. 1
0
 def _():
     assert mf.add([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12],
                    [13, 14, 15, 16]],
                   [[1, -2, 3, -4], [-5, 6, -7, 8], [9, -10, 11, -12],
                    [-13, 14, -15, 16]]) == [[2, 0, 6, 0],
                                             [0, 12, 0, 16],
                                             [18, 0, 22, 0],
                                             [0, 28, 0, 32]]
Esempio n. 2
0
 def _():
     assert mf.add(
         [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10.1], [11, 12, 13, 14, 15],
          [1.6, 17, 13, 19, 20], [21, -22, 23, 24, 25]],
         [[7, 7, 7, 7, 7], [8, 8, 8, 8, 8], [9, -9, 9, -9, 9],
          [3, 4, 5, 6, 7], [11, 12, 13, 14, 14.1]]) == [
              [8, 9, 10, 11, 12], [14, 15, 16, 17, 18.1],
              [20, 3, 22, 5, 24], [4.6, 21, 18, 25, 27],
              [32, -10, 36, 38, 39.1]
          ]
Esempio n. 3
0
 def _():
     assert mf.add([[1, 2], [3, 4]], [[5.2, 2], [-3, -1]]) == [[6.2, 4],
                                                               [0, 3]]
Esempio n. 4
0
 def _():
     assert mf.add(
         [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
         [[9, 7, 4], [7.1, -2, 0], [11, -7, 2]]) == [[10, 9, 7],
                                                     [11.1, 3, 6],
                                                     [18, 1, 11]]
Esempio n. 5
0
 def _():
     mf.add([], [])