If I set up a four column zeros array:
X_large = np.zeros((X.shape[0], 4)
And I have an array X as below:
X = np.array([
[0, 1]
[2, 2]
[3, 4]
[6, 5]
])
How can I get X_large to take X and have the last two columns show the first value of each row of the array squared and the second value of each row of the array cubed? Meaning:
X_large = [ [0, 1, 0, 1],
[2, 2, 4, 8],
[3, 4, 9, 64],
[6, 5, 36, 125] ]
This is probably not too hard, but I'm a pretty novice programmer in general.
Thanks!