[SciPy-user] scipy.io.write_array and the precision

Alan G Isaac aisaac at american.edu
Thu Apr 6 09:14:25 CDT 2006

On Thu, 06 Apr 2006, jaonary at free.fr apparently wrote: 
> I'm trying to write an ascii output of my computation. To do this I'm planing to 
> use the package io of scipy. My problem is that I can't get a simple ascii 
> output. The read_array function write the numbers in the scientific form : 
> 110.330e10. And me, I'd like to write my number simply as 122.00323123. 

Possibly of use (below).
Alan Isaac

>>> help(N.set_printoptions)
Help on function set_printoptions in module numpy.core.arrayprint:

set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None,
    Set options associated with printing.

    precision  the default number of digits of precision for floating
                   point output
                   (default 8)
    threshold  total number of array elements which trigger summarization
                   rather than full repr.
                   (default 1000)
    edgeitems  number of array items in summary at beginning and end of
                   each dimension.
                   (default 3)
    linewidth  the number of characters per line for the purpose of inserting
                   line breaks.
                   (default 75)
    suppress    Boolean value indicating whether or not suppress printing
                   of small floating point values using scientific notation
                   (default False)

More information about the SciPy-user mailing list