I'm completely new to python and Numpy, and I'm trying to rewrite some python code in MATLAB. In the process I found this line which I don't understand a=np.array(eval(self.param[7]))[0:6].sum(); param is an structure containing 8 arrays something like this :
param[0]=100;
param[1]=1;
param[2]=1.5;
param[3]=(1,2,3,4);
param[4]=(1,1,1,1);
param[5]=10;
param[6]=(1,0.,1,1,1,0.,0.,0.);
param[7]=(2,0.,2,3,6,0.,0.,0.);
can someone tell me what does [0:6] and then.sum() do? My thought is a is a sum of all the 7 first element in the param[7], but it does not fit to the whole process.