[Numpy-discussion] set_printoptions precision and single floats
josef.pktd at gmail.com
josef.pktd at gmail.com
Sun Oct 7 22:15:52 EDT 2012
On Sun, Oct 7, 2012 at 6:36 PM, Dan Goodman <dg.gmane at thesamovar.net> wrote:
> On 06/10/2012 18:17, Ralf Gommers wrote:
>> Do you mean scalars or arrays? For me set_printoptions only affects
>> arrays and not scalars. Both float32 and float64 arrays work as advertised:
>
> Yep, I mean scalars (although as Warren noted, it also affects e.g.
> array(1.23456789)).
My impression from previous discussions on the mailing list is that
this is by design:
printing of scalars and scalar arrays is handed off to python which
doesn't have a set_printoptions.
printing of arrays is under the control of numpy
I don't see a way to influence the __str__ or __repr__ of a python float.
Josef
>
> Dan
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list