On Mon, Nov 22, 2010 at 12:47 AM, MATLABdude <matlab.d...@mbnet.fi> wrote: > On Nov 17, 10:53 am, Arnaud Delobelle <arno...@gmail.com> wrote: >> I guess that the step is supposed to be h, so you should write: >> xx = range(-kappa, kappa+1, h) > > This is what I have in the source code: > ---8<---8<---8<---8<--- > h = 0.105069988414 > xx = range(-kappa, kappa+1, h) > ---8<---8<---8<---8<--- > > This is what Python says: ValueError: range() step argument must not > be zero > > Can step not be a float value?
Correct. Note the DeprecationWarning which is also shown: __main__:1: DeprecationWarning: integer argument expected, got float There are too many subtleties with floating-point, so range() doesn't handle it; that way, you deal with the subtleties yourself, explicitly. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list