Generating equally-spaced floats with least rounding error

f.derainville at gmail.com f.derainville at gmail.com
Sat Sep 24 16:54:16 EDT 2011


>>> import numpy
>>> numpy.arange(0, 3, 0.3)
array([ 0. ,  0.3,  0.6,  0.9,  1.2,  1.5,  1.8,  2.1,  2.4,  2.7])



More information about the Python-list mailing list