[SciPy-user] Latex output with io.write_array
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Tue Oct 7 03:18:38 EDT 2003
Dear experts,
Is it somehow possible to extent the output options of io.write_array
It would be nice to have an \LaTex output, e.g.
from scipy import *
from RandomArray import *
file=open("latex.out",'w')
A = rand(3,3)
io.write_array(file,A,separator='&', linesep='\n', precision=5,
keep_open=0)
9.70506e-01&7.53710e-01&3.78068e-01
1.16224e-01&4.41116e-01&9.08877e-01
5.99735e-01&4.20824e-01&8.19178e-01
I would like to have something like that
\left[\begin{array}{ccc}
9.70506e-01&7.53710e-01&3.78068e-01 \\
1.16224e-01&4.41116e-01&9.08877e-01 \\
5.99735e-01&4.20824e-01&8.19178e-01
\end{array}\right]
Any suggestion ?
Nils
More information about the SciPy-User
mailing list