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

jaonary@free.fr jaonary at free.fr
Thu Apr 6 09:36:19 CDT 2006


I had a look into the io.array_import.py and did the following modification :


def str_array(arr, precision=5,col_sep=' ',row_sep="\n",ss=0):

  --> added
    if precision > -1 :
    	fmtstr = "%%.%de" % precision
    else :
	fmtstr = "%f"

And now I have what I need when I use io.write_array(file,array,precision=-1)

Jaonary



More information about the SciPy-user mailing list