transpose matrix [[1,2,3,4],[4,5,6,8]] in python code example
Example: how to transpose a 2d list in python
import numpy as np
def func(my_matrix):
# Making np array of the list
my_matrix = np.array(my_matrix)
# Find the transpose to get image vector in column
my_matrix = my_matrix.transpose()
return my_matrix