[Numpy-discussion] printoption to allow hexified floats?

Robert Kern robert.kern at gmail.com
Wed Dec 1 22:02:02 EST 2010

On Wed, Dec 1, 2010 at 13:18, Ken Basye <kbasye1 at jhu.edu> wrote:
> Hi Numpy folks,
>     When working with floats, I prefer to have exact string
> representations in doctests and other reference-based testing; I find it
> helps a lot to avoid chasing cross-platform differences that are really
> about the string conversion rather than about numerical differences.

Unfortunately, there are still cross-platform numerical differences
that are real (but are irrelevant to the validity of the code under
test). Hex-printing for floats only helps a little to make doctests
useful for numerical code.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list