[Numpy-discussion] printing array in tabular form

Sudheer Joseph sudheer.joseph at yahoo.com
Fri May 10 05:12:03 EDT 2013


Thank you for the response,
                         Infact the program which should read this file requires it in specified format which should look like
IL = 1,2,3,4,5
     1,2,3,4,5
     1,2,3,4,5
 
JL = 1,2,3,4,5
     1,2,3,4,5
     1,2,3,4,5
so, what I followed from the mail was that np.savetxt can save it in a file and there is no option like
write a string and then leave space and then write the array in above fashion. I searched for a while but could not get any solution.
with best regards,
Sudheer

***************************************************************
Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
E-mail:sjo.India at gmail.com;sudheer.joseph at yahoo.com
Web- http://oppamthadathil.tripod.com
***************************************************************


>________________________________
> From: Henry Gomersall <heng at cantab.net>
>To: Discussion of Numerical Python <numpy-discussion at scipy.org> 
>Sent: Thursday, 9 May 2013 2:51 PM
>Subject: Re: [Numpy-discussion] printing array in tabular form
> 
>
>On Thu, 2013-05-09 at 16:06 +0800, Sudheer Joseph wrote:
>> If I wanted to print below text in a file (for reading by another
>> program), it looks to be not an easy job....Hope new developments will
>> come and a userfriendly formatted out put method for pyton will
>> evolve.
>
>I don't understand what the problem is - this seems to be trivial to
>solve. You gave an example in Fortran; Is the transliteration to Python
>not acceptable?
>
>Is the output format specified by the receiving program? If not, there
>are loads of options for creating interoperable text files.
>
>Henry
>
>_______________________________________________
>NumPy-Discussion mailing list
>NumPy-Discussion at scipy.org
>http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130510/1d3f1629/attachment.html>


More information about the NumPy-Discussion mailing list