Closed JulienB-78 closed 8 years ago
@JulienB-78 , Although I agree with you, I'd change (x[i] + x[1+i]) / 2
to (x[i] + x[1+i]) / 2.0
, cause it matters in Python 3.x.
I think you can correct it and make a pull request.
Thank you for pointing it out! I did not notice this issue for many months...
I think there is a bug in the shortest function: __reduce_by_half(x). With the current version, only the first half of x is used to compute the reduced vector.
Shouldn't it be something like: def __reduce_by_half(x): return [(x[i] + x[1+i]) / 2 for i in xrange(0, len(x)-len(x)%2, 2)]