[Numpy-discussion] set_printoptions - floating point format option?

Robert Cimrman cimrman3@ntc.zcu...
Mon Jun 23 13:11:36 CDT 2008


Hi,

I need to display some numpy arrays in mantissa+exponent format (e.g. 
'%.2e' using C syntax). In numpy.set_printoptions(), there is currently 
only 'precision' option, which does not allow this.

What about having an option related to 'precision', named possibly 
'float_format', with the following function:

     :Parameters:
         format : string
             Format string for floating point output, has precedence 
over 'precision' (default '%.8f').

r.


More information about the Numpy-discussion mailing list