Re: help: output arrays into file as column

2006-07-28 Thread bei
Perfect! It works. Thanks Bruno. Bruno Desthuilliers wrote: > bei a écrit : > Please don't top-post > > > Hi,Simon, > > > > Thanks for your reply.It's very helpful :) > > But I am sorry for my given example.Actually, my data in the arrays are > > all float point datas.And I use integer in the exam

Re: help: output arrays into file as column

2006-07-27 Thread Bruno Desthuilliers
bei a écrit : Please don't top-post > Hi,Simon, > > Thanks for your reply.It's very helpful :) > But I am sorry for my given example.Actually, my data in the arrays are > all float point datas.And I use integer in the example.The code is like > this. > ("x,v,...,h" are floating point number arra

Re: help: output arrays into file as column

2006-07-27 Thread bei
Hi,Simon, Thanks for your reply.It's very helpful :) But I am sorry for my given example.Actually, my data in the arrays are all float point datas.And I use integer in the example.The code is like this. ("x,v,...,h" are floating point number arrays) pos=str(x) vel=str(v) ene=str(u) den=str(rho) p

Re: help: output arrays into file as column

2006-07-27 Thread Simon Forman
bei wrote: > Hi, > > I am trying to write several arrays into one file, with one arrays in > one column. Each array (column) is seperated by space. > ie. a=[1,2,3, 4] b=[5,6,7,8] c=[9,10,11,12] > 1 5 9 > 2 6 10 > 3 7 11 > 4 8 12 > > Now I use the function file.writelines(a), file.writelines

help: output arrays into file as column

2006-07-27 Thread bei
Hi, I am trying to write several arrays into one file, with one arrays in one column. Each array (column) is seperated by space. ie. a=[1,2,3, 4] b=[5,6,7,8] c=[9,10,11,12] 1 5 9 2 6 10 3 7 11 4 8 12 Now I use the function file.writelines(a), file.writelines(b), file.writelines(c). And th