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

Répondre à