[Numpy-discussion] set_printoptions precision and single floats

Dan Goodman dg.gmane at thesamovar.net
Fri Oct 5 11:17:46 EDT 2012


numpy.set_printoptions(precision=...) doesn't affect single floats, even 
if they are numpy floats rather than Python floats. Is this a bug or is 
there some reason for this behaviour? I ask because I have a class that 
derives from numpy.float64 and adds some extra information, and I'd like 
to be able to control the precision. I could fix it to use the precision 
set by numpy.set_printoptions, but then it would be inconsistent with 
how numpy itself handles precision. Thoughts?


More information about the NumPy-Discussion mailing list