[Tutor] Unsubscribe my membership

2008-05-31 Thread Kriti Satija
Please Unsubscribe my membership from Python tutorlist. List Password // URL tutor@python.org hariom Planet Earth is in the hot seat. Know more - http://in.search.yahoo.com/

Re: [Tutor] reading a string into an array

2008-05-31 Thread Kent Johnson
On Sat, May 31, 2008 at 3:43 PM, Bryan Fodness <[EMAIL PROTECTED]> wrote: > I am trying to read a long string of values separated by a backslash into an > array of known size. > > Here is my attempt, > > from numpy import * > ay, ax = 384, 512 > a = zeros([ay, ax]) > for line in open('out.out'): >

[Tutor] reading a string into an array

2008-05-31 Thread Bryan Fodness
I am trying to read a long string of values separated by a backslash into an array of known size. Here is my attempt, from numpy import * ay, ax = 384, 512 a = zeros([ay, ax]) for line in open('out.out'): data = line.split('\\') k = 0 for i in range(ay): for j in range(ax): a[i, j