printing array in tabular form

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) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% in fortran I could do it as below %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% integer matrix(5,5) in=0 do, k=1,5 do, l=1,5 in=in+1 matrix(k,l)=in enddo enddo m=5 n=5 do, i=1,m write(*,"(5i5)") ( matrix(i,j), j=1,n ) enddo end *************************************************************** 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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************

Dear Sudheer, On 07.05.2013, at 11:14AM, Sudheer Joseph <sudheer.joseph@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 np.arange(1,bno+1): IL.append(i) print(IL)
assuming you want this table printed to a file, savetxt does just what you need. In brief for your case, np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',') should print it in the requested form; you can refer to the save txt documentation for further options. HTH, Derek

Thank you Derek, 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 'reshape' 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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************
________________________________ From: Derek Homeier <derek@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.joseph@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 np.arange(1,bno+1): IL.append(i) print(IL)
assuming you want this table printed to a file, savetxt does just what you need. In brief for your case,
np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')
should print it in the requested form; you can refer to the save txt documentation for further options.
HTH, Derek
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

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 'reshape'
IL is a list, not a numpy array. You can either convert the list to an array after you've filled it, using np.array(IL), or you can pre-allocate the array and fill it directly in the loop. Cheers, Henry

Thank you Gomersall, However writing a formatted out put looks to be bit tricky with python relative to other programing languages. For example, 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. IL= 1,2,3,4,5 5,5,6,8,0 JL= 1,2,3,4,5 5,5,6,8,0 KL= 1,2,3,4,5 5,5,6,8,0 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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************
________________________________ From: Henry Gomersall <heng@cantab.net> To: Discussion of Numerical Python <numpy-discussion@scipy.org> Sent: Wednesday, 8 May 2013 12:23 PM Subject: 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=',') AttributeError: 'list' object has no attribute 'reshape'
IL is a list, not a numpy array. You can either convert the list to an array after you've filled it, using np.array(IL), or you can pre-allocate the array and fill it directly in the loop.
Cheers,
Henry
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On 9 May 2013 10:06, Sudheer Joseph <sudheer.joseph@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.

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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************
________________________________ From: Daπid <davidmenhur@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, Sudheer Joseph <sudheer.joseph@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@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

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 basic understanding of it. Every language is going to be tricky if you approach it with the mindset of Fortran programming. The output format you are trying to obtain is easy in forrtran because it is how the default text output formatting is designed. Of course obtaining it with a different programming language / numerical library takes some more effort. But is not tricky at all. Cheers, Daniele

Hi, I am trying to learn Python after feeling its utility in coding and also reading a bit about its potential only, please do not put words in to my mouth like below.
Before denigrating a programming language
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 to explain my requirement with best regards, Sduheer From: Daniele Nicolodi <daniele@grinta.net> To: numpy-discussion@scipy.org
Sent: Friday, 10 May 2013 3: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)")
Before denigrating a programming language I would make sure to have a basic understanding of it. Every language is going to be tricky if you approach it with the mindset of Fortran programming.
The output format you are trying to obtain is easy in forrtran because it is how the default text output formatting is designed. Of course obtaining it with a different programming language / numerical library takes some more effort. But is not tricky at all.
Cheers, Daniele
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On 10.05.2013, at 1:20PM, Sudheer Joseph <sudheer.joseph@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 to explain my requirement
Admittedly the formatting options in Python can be confusing to beginners, precisely since they are much more powerful than for many other languages. As already pointed out, formats of the type '(5i5)' are very common to Fortran programs and thus readily supported by the language. np.savetxt is just a convenience function to support a number of similarly common output types, and it can create csv, tab-separated, or plenty of other outputs from a numpy array just out of the box. But you added to the confusion as you did not make it clear that you were not just requiring a plain csv file as your Fortran example would create (and the first version did not even have the commas); since this is a rather non-standard form you will just have to write a short loop yourself, wether you are using Fortran or Python.
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
The formats are all documented http://docs.python.org/2/library/string.html#format-specification-mini-langu... one important thing to know is that you can pretty much add (i.e. concatenate) them like strings: print(("%6s"+4*"%d,"+"%d\n") % (("IL = ",)+tuple(IL[:5]))) or, perhaps a bit clearer: fmt = "%6s"+4*"%d,"+"%d\n" print_t = ("IL = ",)+tuple(IL[:5]) print(fmt % print_t) The other important bit to keep in mind is that all arguments have to be passed as tuples. This should allow you to write a loop to print with a "header" or an empty header column for the subsequent lines as you see fit. Except for the string field which is explicitly formatted "%s" here, this is mostly equivalent to the example Henry just posted. HTH, Derek

Thank you Very much, This will help me a lot. with best regards, Sudheer ----- Original Message -----
From: Derek Homeier <derek@astro.physik.uni-goettingen.de> To: Discussion of Numerical Python <numpy-discussion@scipy.org> Cc: Sent: Friday, 10 May 2013 6:10 PM Subject: Re: [Numpy-discussion] printing array in tabular form
On 10.05.2013, at 1:20PM, Sudheer Joseph <sudheer.joseph@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 to explain my requirement
Admittedly the formatting options in Python can be confusing to beginners, precisely since they are much more powerful than for many other languages. As already pointed out, formats of the type '(5i5)' are very common to Fortran programs and thus readily supported by the language. np.savetxt is just a convenience function to support a number of similarly common output types, and it can create csv, tab-separated, or plenty of other outputs from a numpy array just out of the box. But you added to the confusion as you did not make it clear that you were not just requiring a plain csv file as your Fortran example would create (and the first version did not even have the commas); since this is a rather non-standard form you will just have to write a short loop yourself, wether you are using Fortran or Python.
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
The formats are all documented http://docs.python.org/2/library/string.html#format-specification-mini-langu... one important thing to know is that you can pretty much add (i.e. concatenate) them like strings:
print(("%6s"+4*"%d,"+"%d\n") % (("IL = ",)+tuple(IL[:5])))
or, perhaps a bit clearer:
fmt = "%6s"+4*"%d,"+"%d\n" print_t = ("IL = ",)+tuple(IL[:5]) print(fmt % print_t)
The other important bit to keep in mind is that all arguments have to be passed as tuples. This should allow you to write a loop to print with a "header" or an empty header column for the subsequent lines as you see fit. Except for the string field which is explicitly formatted "%s" here, this is mostly equivalent to the example Henry just posted.
HTH, Derek
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

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 gave my interpretation of what you wrote.
Before denigrating a programming language
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 to explain my requirement
For references about string formatting in Python: http://docs.python.org/2/library/string.html#formatstrings http://docs.python.org/2/library/stdtypes.html#string-formatting for the numpy array to text formatting: http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html writing a function to do what you ask is trivial. Unfortunately there is no "format the thing as I wish" function. 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): header = "{} = ".format(name) out.write(header) np.savetxt(out, v, fmt="%d", delimiter=", ", newline="\n" + " " * len(header)) out.write("\n") IL = np.array([range(5), ] * 5) format(sys.stdout, IL, "IL") Cheers, Daniele

On 10.05.2013, at 2:51PM, Daniele Nicolodi <daniele@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): header = "{} = ".format(name) out.write(header) np.savetxt(out, v, fmt="%d", delimiter=", ", newline="\n" + " " * len(header)) out.write("\n")
IL = np.array([range(5), ] * 5) format(sys.stdout, IL, "IL")
That is a quite ingenuous way to use savetxt functionality to write that extra column! Only two comments: Don't call that function "format", as it would mask the 'format' builtin! In the present version it will only work with a file handle; to print it a to file you would need to pass it as fformat(open(fname, 'a'), … or check for that case inside the function. Cheers, Derek

Thank youNicolodi, I hope I did not hurt you by my little fight.!! with best regards, Sudheer ----- Original Message -----
From: Daniele Nicolodi <daniele@grinta.net> To: numpy-discussion@scipy.org Cc: Sent: Friday, 10 May 2013 6:21 PM Subject: Re: [Numpy-discussion] 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 quoted emails you sent to the list and gave my interpretation of what you wrote.
Before denigrating a programming language
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 to explain my requirement
For references about string formatting in Python:
http://docs.python.org/2/library/string.html#formatstrings http://docs.python.org/2/library/stdtypes.html#string-formatting
for the numpy array to text formatting:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html
writing a function to do what you ask is trivial. Unfortunately there is no "format the thing as I wish" function.
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): header = "{} = ".format(name) out.write(header) np.savetxt(out, v, fmt="%d", delimiter=", ", newline="\n" + " " * len(header)) out.write("\n")
IL = np.array([range(5), ] * 5) format(sys.stdout, IL, "IL")
Cheers, Daniele
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On Fri, 2013-05-10 at 17:14 +0800, Sudheer Joseph wrote:
Thank you, But I was looking for a format statement likw write(*,"(A,5F8.3)") with best regards, Sudheer
How about the following: print('IL = ' + (('%d,' * 5)[:-1] + '\n ') * 5 % tuple(IL)) If instead of a list IL you had some arbitrary 2D array, a, you could do (with 2 lines for clarity): print_string = 'a = ' + (('%d,' * a.shape[1])[:-1] + '\n ') * a.shape[0] % tuple(a.T.ravel()) print(print_string) I'll leave it as an exercise for you to put that into a file. hen

Thank you very much, These tips with some effort from me should do it for me. 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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com *************************************************************** ----- Original Message -----
From: Henry Gomersall <heng@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
On Fri, 2013-05-10 at 17:14 +0800, Sudheer Joseph wrote:
Thank you, But I was looking for a format statement likw write(*,"(A,5F8.3)") with best regards, Sudheer
How about the following:
print('IL = ' + (('%d,' * 5)[:-1] + '\n ') * 5 % tuple(IL))
If instead of a list IL you had some arbitrary 2D array, a, you could do (with 2 lines for clarity):
print_string = 'a = ' + (('%d,' * a.shape[1])[:-1] + '\n ') * a.shape[0] % tuple(a.T.ravel()) print(print_string)
I'll leave it as an exercise for you to put that into a file.
hen
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Sudheer, This is not really numpy specific. There are many options for output formatting in python. For the specific question you have, you could do: print '{0}{1:8.3f}{2:8.3f}{3:8.3f}{4:8.3f}{5:8.3f}'.format(s,x1,x2,x3,x4,x5) format is a built-in python string method (see python docs). The one thing that I will agree with you on is that, as far as I know, there is no repeat count mechanism. There are tricky ways around that, e.g. fmt = '{0}' + ''.join(['{'+str(i)+':8.3f}' for i in range(1,6)]) print fmt.format(s,x1,x2,x3,x4,x5) though not as simple as the fortran output statement. Jon On Fri, 2013-05-10 at 17:14 +0800, Sudheer Joseph wrote:
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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************
______________________________________________________________ From: Daπid <davidmenhur@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, Sudheer Joseph <sudheer.joseph@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@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
-- ______________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA jslavin@cfa.harvard.edu 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ______________________________________________________________

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

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@gmail.com;sudheer.joseph@yahoo.com Web- http://oppamthadathil.tripod.com ***************************************************************
________________________________ From: Henry Gomersall <heng@cantab.net> To: Discussion of Numerical Python <numpy-discussion@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@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On Thu, May 9, 2013 at 1:06 AM, Sudheer Joseph <sudheer.joseph@yahoo.com>wrote:
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 easier, than most languages. Take a little time to learn a bit of pyton, and a bit of numpy, then come back if you can't figure it out. But as a rule -- if it's seems hard and/or awkward, you are probably doing it wrong! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (7)
-
Chris Barker - NOAA Federal
-
Daniele Nicolodi
-
Daπid
-
Derek Homeier
-
Henry Gomersall
-
Jonathan Slavin
-
Sudheer Joseph