So I'm currently learning python and numpy and I'm testing this code because I can't get A[:, 1] = arr[:, 0] to work whatsoever. I thought it was maybe an object thing or something (coming from javascript/java/C to python) but it seems it's actually the arr[:, 0] that is causing issues saying that there is too many indices... but I'm just printing all of the indices in column 1 right? Lost Here.
import numpy as np
arr = np.array([1, 2, 3, 4])
degree = 7
A = np.ones((len(arr), degree))
print(A[:, 1])
print(arr[:, 0])
^ full attached code above
arris one dimensional so you can't give it two dimensional indices.