I want to reshape a list into an numpy array of a specific dimension. My list looks like the following:
my_list = [array([[1],
[2],
[3],
[4]],
[[2],
[3],
[4],
[1]],
[[3],
[4],
[2],
[1]])]
I want to convert this list into a numpy array and reshape it to a dimension of (3, 4), such as the following:
my_list = [array([1, 2, 3, 4],
[2, 3, 4, 1],
[3, 4, 1, 2])]
I have checked some earlier threads on this, such as Transposing a NumPy array and SciPy documentation, but can't seem to understand how it works and could not convert my list to what my desired array form.