In implementing an autocorrelation function I have a term like
for k in range(start,N):
c[k] = np.sum(f[:-k] * f[k:])/(N-k)
Now everything works fine if
start = 1 but I'd like to handle nicely the start at
0 case without a conditional.
Obviously it doesn't work as it is because
f[:-0] == f[:0] and returns an empty array, while I'd want the full array in that case.