Reputation: 89
Okay, I have an array that has 5 rows and one column. I have another array with 5 columns, and 1 row. Is there a way that I can change the values of the array with the rows to the columns in a simpler way. I know that I can do this:
import numpy as np
x = np.ones(5)
y = np.zeros([5,1])
y[:,0] = x
Is there a easier way of doing this. I will be flipping many values in rows to columns, and this may get messy in my actual code.
Upvotes: 0
Views: 87