[Numpy-discussion] problem with float64's str()
Robert Kern
robert.kern@gmail....
Thu Apr 10 19:38:45 CDT 2008
On Thu, Apr 10, 2008 at 7:31 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
> > That said, str(float_numpy_scalar) really should have the same rules
> > as str(some_python_float).
>
> For all different precisions?
No. I should have said str(float64_numpy_scalar). I am content to
leave the other types alone.
> And what should the rules be.
All Python does is use a lower decimal precision for __str__ than __repr__.
> I note that
> numpy doesn't distinguish between repr and str, maybe we could specify
> different behavior for the two.
Yes, precisely.
--
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