[Numpy-discussion] Numpy float precision vs Python list float issue
Mon Apr 20 12:21:00 CDT 2009
On 2009-04-20, at 10:04 AM, David Cournapeau wrote:
> Yes, it is legitimate and healthy to worry about the difference - but
> the surprising thing really is the list behavior when you are used to
> numerical computation :) And I maintain that the algorithms are not
> the same in both operations. For once, the operation of using arrays
> on the data do not give the same data in both cases, you can see right
> away that m and ml are not the same, e.g.
> print ml - morig
> shows that the internal representation is not exactly the same.
> Numpy-discussion mailing list
The discrepancy David found in ml - morig vanishes if you change line
morigl = ml[:]
morigl = copy.deepcopy(ml)
There is still an issue with disagreement in minimum diff, but I'd bet
it is not a floating point precision problem.
More information about the Numpy-discussion