non mais c'est pas un bug, c'est normal pour une représentation en float32.
c'est peut-être plus à voir du côté des implémentations de %f trichant la moindre sur les séries genre .xx999999 etc, je dis ceci au hasard mais cela ne m'étonnerait point. Le 2 mars 2012 à 19:28, François Bianco a écrit : > Daniel, > > Je me répond à moi même : oui c'est la représentation des nombres en float32 > qui pose problème : > > x = [1.01, 2.1, 0.03, 0.04, 0.05] > y = array(x, dtype=float32) > print(y) > > array([ 1.00999999, 2.0999999 , 0.03 , 0.04 , 0.05 ], > dtype=float32) > > > Alors que : > > y = array(x, dtype=float64) > print(y) > array([ 1.01, 2.1 , 0.03, 0.04, 0.05]) > > François > _______________________________________________ > gull mailing list > [email protected] > http://forum.linux-gull.ch/mailman/listinfo/gull -- Philippe Strauss http://www.strauss-acoustics.ch/ _______________________________________________ gull mailing list [email protected] http://forum.linux-gull.ch/mailman/listinfo/gull
