[Numpy-discussion] arrays comparison issue
Jean-Luc Menut
jeanluc.menut@free...
Wed Nov 4 08:52:15 CST 2009
Hello all,
If if define 2 variables a and b by doing the following :
on [5]: a
Out[5]: array([ 1.7])
In [6]: b=array([0.8])+array([0.9])
In [7]: b
Out[7]: array([ 1.7])
if I test the equality of a and b, instead to obatin True, I have :
In [8]: a==b
Out[8]: array([False], dtype=bool)
I know it not related only to numpy but also to python.
How do you tackle this problem ?
(I also tried on IDL and it works well : I guess it truncate the number).
Thanks ,
Jean-Luc
More information about the NumPy-Discussion
mailing list