Robert Kern wrote: > On Fri, Apr 4, 2008 at 9:56 AM, Will Lee <[EMAIL PROTECTED]> wrote: > >> I understand the implication for the floating point comparison and the need >> for allclose. However, I think in a doctest context, this behavior makes >> the doc much harder to read. >> > > Tabling the issue of the fact that we changed behavior for a moment, > this is a fundamental problem with using doctests as unit tests for > numerical code. The floating point results that you get *will* be > different on different machines, but the code will still be correct. > Using allclose() and similar techniques are the best tools available > (although they still suck). Relying on visual representations of these > results is simply an untenable strategy. Note that the string > representation of NaNs and Infs are completely different across > platforms. > > Well said, Robert.
> That said, str(float_numpy_scalar) really should have the same rules > as str(some_python_float). > > +1 -Travis _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion