I been trying to code the following line but I get the message that operands could not be broadcast together with shapes (0,) (30,) x has a length of 32
x[:-N+1]
I want to access all elements except the last twox[N:-N]
I want to access all elements except the first one and the last onex[N+1:]
I want to access all elements except the first
y = x[:-N+1] - 2 * x[N:-N] + x[N+1:]
How should I index x to access those values? I'm new to python so any tips would be appreciated.