Re: assigning a sequence to an array

2006-11-08 Thread [EMAIL PROTECTED]
actually what i want to do is this: i have a file with following format: 1 2 3 9 2 3 4 4 I want to read it and then store the values into two matrices, s.t. A=[1 2;3 9] B=[2 3;4 4] any easier way of doing this? thanks Amit Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > I am using "A[

Re: assigning a sequence to an array

2006-11-08 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > I am using "A[a,:]=row" in python, where A is a matrix and row is a > sequence. But it gives following error: > error-- > A[a,:]=row > ValueError: setting an array element with a sequence. > > Is there a way to change type of sequence to array so

assigning a sequence to an array

2006-11-07 Thread [EMAIL PROTECTED]
Hi, I am using "A[a,:]=row" in python, where A is a matrix and row is a sequence. But it gives following error: error-- A[a,:]=row ValueError: setting an array element with a sequence. Is there a way to change type of sequence to array so that this situation could be handled tha