Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
*** - Original Message - From: Henry Gomersall h...@cantab.net To: Discussion of Numerical Python numpy-discussion@scipy.org Cc: Sent: Friday, 10 May 2013 5:29 PM Subject: Re: [Numpy-discussion] printing array in tabular form

Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
Subject: Re: [Numpy-discussion] printing array in tabular form On 10.05.2013, at 1:20PM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: If some one has a quick way I would like to learn from them or get a referecence where the formatting part is described which was my intention while

Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
] printing array in tabular form On 10/05/2013 13:20, Sudheer Joseph wrote: Hi, I am trying to learn Python after feeling its utility in coding and also reading a bit aboutits potential only, please do not put words in to my mouth like below. I didn't put words in your mouth, I simply

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Sudheer Joseph
*** From: Daπid davidmen...@gmail.com To: Discussion of Numerical Python numpy-discussion@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

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Daniele Nicolodi
On 10/05/2013 11:14, Sudheer Joseph wrote: However writing a formatted out put looks to be bit tricky with python relative to other programing languages. ... I was looking for a format statement likw write(*,(A,5F8.3)) Before denigrating a programming language I would make sure to have a

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Sudheer Joseph
:12 PM Subject: Re: [Numpy-discussion] printing array in tabular form On 10/05/2013 11:14, Sudheer Joseph wrote: However writing a formatted out put looks to be bit tricky with python relative to other programing languages. ... I was looking for a format statement likw write(*,(A,5F8.3

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Derek Homeier
On 10.05.2013, at 1:20PM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: If some one has a quick way I would like to learn from them or get a referecence where the formatting part is described which was my intention while posting here. As I have been using fortran I just tried to use it

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Jonathan Slavin
numpy-discussion@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.jos...@yahoo.com wrote: However writing a formatted out put looks

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Daniele Nicolodi
On 10/05/2013 13:20, Sudheer Joseph wrote: Hi, I am trying to learn Python after feeling its utility in coding and also reading a bit aboutits potential only, please do not put words in to my mouth like below. I didn't put words in your mouth, I simply quoted emails you sent to the list and

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Derek Homeier
On 10.05.2013, at 2:51PM, Daniele Nicolodi dani...@grinta.net wrote: If you wish to format numpy arrays preceding them with a variable name, the following is a possible solution that gives the same formatting as in your example: import numpy as np import sys def format(out, v, name):

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Sudheer Joseph
: Re: [Numpy-discussion] printing array in tabular form On Wed, 2013-05-08 at 10:13 +0800, Sudheer Joseph wrote: However I get below error. Please tell me if any thing I am missing. file read_reg_grd.py, line 22, in module     np.savetxt(file.txt, IL.reshape(-1,5), fmt='%5d', delimiter

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Daπid
On 9 May 2013 10:06, Sudheer Joseph sudheer.jos...@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:

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Henry Gomersall
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 jobHope new developments will come and a userfriendly formatted out put method for pyton will evolve. I don't understand what the

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Chris Barker - NOAA Federal
On Thu, May 9, 2013 at 1:06 AM, Sudheer Joseph sudheer.jos...@yahoo.comwrote: Thank you Gomersall, However writing a formatted out put looks to be bit tricky with python relative to other programing languages. this is just plain wrong -- working with text in python is as easy, or

Re: [Numpy-discussion] printing array in tabular form

2013-05-08 Thread Henry Gomersall
On Wed, 2013-05-08 at 10:13 +0800, Sudheer Joseph wrote: However I get below error. Please tell me if any thing I am missing. file read_reg_grd.py, line 22, in module np.savetxt(file.txt, IL.reshape(-1,5), fmt='%5d', delimiter=',') AttributeError: 'list' object has no attribute

[Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
Dear experts,     I need to print few arrays in a tabular form for example below array IL has 25 elements, is there an easy way to print this as 5x5 comma separated table? in python IL=[] for i in np.arange(1,bno+1):    IL.append(i) print(IL)

Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Derek Homeier
Dear Sudheer, On 07.05.2013, at 11:14AM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: I need to print few arrays in a tabular form for example below array IL has 25 elements, is there an easy way to print this as 5x5 comma separated table? in python IL=[] for i in

Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
...@astro.physik.uni-goettingen.de To: Discussion of Numerical Python numpy-discussion@scipy.org Sent: Tuesday, 7 May 2013 6:41 PM Subject: Re: [Numpy-discussion] printing array in tabular form Dear Sudheer, On 07.05.2013, at 11:14AM, Sudheer Joseph sudheer.jos...@yahoo.com wrote:             I need