Reshape a numpy array so the columns wrap below the original rows
Reshape a numpy array so the columns wrap below the original rows Question: Consider the following scenario: a = np.array([[1,1,1,3,3,3], [2,2,2,4,4,4]]) np.reshape(a, (4, 3)) Output: array([[1, 1, 1], [3, 3, 3], [2, 2, 2], [4, 4, 4]]) Desired output: array([[1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4]]) How can I reshape …