[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)

[Numpy-discussion] Numpy beginner tutorial

2013-05-07 Thread Nicolas Rougier
Hello everybody, I've written a numpy beginner tutorial that is available from: http://www.loria.fr/~rougier/teaching/numpy/numpy.html It has been designed around cellular automata to try to make it fun. While writing it, I tried to compile a set of exercises and make them progressively

Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-05-07 Thread Sebastian Berg
On Mon, 2013-05-06 at 12:11 -0400, Yaroslav Halchenko wrote: On Mon, 06 May 2013, Sebastian Berg wrote: if you care to tune it up/extend and then I could fire it up again on that box (which doesn't do anything else ATM AFAIK). Since majority of time is spent actually building it (did

Re: [Numpy-discussion] Really cruel draft of vbench setup for NumPy (.add.reduce benchmarks since 2011)

2013-05-07 Thread Daπid
On 7 May 2013 13:47, Sebastian Berg sebast...@sipsolutions.net wrote: Indexing/assignment was the first thing I thought of too (also because fancy indexing/assignment really could use some speedups...). Other then that maybe some timings for small arrays/scalar math, but that might be nice for

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
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,