[Numpy-discussion] printing array in tabular form

Sudheer Joseph sudheer.joseph at yahoo.com
Fri May 10 05:14:37 EDT 2013


Thank you,
              But I was looking for  a format statement likw write(*,"(A,5F8.3)")
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: Daπid <davidmenhur at gmail.com>
>To: Discussion of Numerical Python <numpy-discussion at scipy.org> 
>Sent: Thursday, 9 May 2013 2:29 PM
>Subject: Re: [Numpy-discussion] printing array in tabular form
> 
>
>On 9 May 2013 10:06, Sudheer Joseph <sudheer.joseph at yahoo.com> wrote:
>> However writing a formatted out put looks to be bit tricky with python
>> relative to other programing languages.
>
>If performance is not an issue, you could do it by hand, as you can
>always do in any programming language:
>
>
>savefile = open('data.txt', 'w')
>N = len(IL)
>
>for start in xrange(N/5):
>   if start+5 > N:
>     end = N
>   else:
>     end = start+5
>   print >> savefile, IL[start : end]
>
>
>But this is actually more verbose, and once you get into NumPy
>workflow, it is actually simple.
>_______________________________________________
>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/82e359c5/attachment.html>


More information about the NumPy-Discussion mailing list