I have a big matrix of 300x100 lines. The problem is that some rows have 99 columns instead of 100.
I tried as an example with zip:
a = [[1,2,3],[4,5,6]]
b = [[1,2,3],[4,5]]
print zip(*a)
print zip(*b)
But the resulting matrix is truncated to the lowest number of elements, so the result from the example above is:
[(1, 4), (2, 5), (3, 6)]
[(1, 4), (2, 5)]
Also tried with numpy
and transpose
and it's not transposing the matrix because it is not regular.
I need to transpose this big matrix and get a 100x300 matrix and avoid a truncated matrix. So, is there already any python function or module that would return the transpose without truncating it?