I am writing a function getdata for other people, and I want others can use
the function as follows.
var1,var2, var3=getdata(..., ['var1','var2','var3'],...)
If I can not return data column by column, I can not get the above, right?
On 10/7/07, Eric Brunson <[E
Dear all-
I wonder whether there is a way in Python which can do what "eval" in
Matlab does.
Say, varlist is a 1 by k tuple/list, which contains strings for variable
names.
For example, varlist=['var1','var2',...'vark']
data is a n by k matrix.
I want to assign each column in data to each variabl
Thank all for the discussion.
Maybe I can separate my question into two.
First, I have experience in Matlab, where I can use "eval". I wonder whether
someone knows about it.
Second, if I just want to return data[:,1], ...data[:,-1] separately without
knowing ahead how many columns data has. What
Dear all-
I am writing a function as follows.
def getdata(varlist):
eventually I have a variable called "data", which have exactly the same
number of columns as the name of variables in varlist.
Say varlist=['var1','var2','var3']. I want to assign var1=data[:,0],
var2=data[:,1], var3=data[