16 lines
424 B
Python
16 lines
424 B
Python
from matrixmania import transpose
|
|
|
|
def test_transpose_1():
|
|
a = [[1, 2, 3],
|
|
[4, 5, 6]]
|
|
assert transpose(a) == [[1, 4],
|
|
[2, 5],
|
|
[3, 6]]
|
|
|
|
def test_transpose_2():
|
|
a = [[3, 4, -1, 4],
|
|
[-2, 2, 5, 1]]
|
|
assert transpose(a) == [[3, -2],
|
|
[4, 2],
|
|
[-1, 5],
|
|
[4, 1]] |