where is the error?

lajam at caramail.com lajam at caramail.com
Fri Jun 27 08:12:47 EDT 2008


There was an error with the name of the variable !!!! I would not ask
this if it was just a question of different variable names !!!!!

diff_temp=(logical_and(values[:,5] > -2,values[:,5] < 2)).nonzero()
new_values=values[diff_temp,:]

Okay, I'm going to try to explain that more specifically that I did. I
have an array called values (size mxn). In this database, I just want
the lines for which the values of the nth row are between two values
(it's the purpose of diff_temp). So diff_temp gets me the number of
the lines for which this latter criteria is right. But I'm interested
on the values of the lines corresponding to the number given by
diff_temp.


In matlab, I will do

diff_temp=find(values(:,5) > -2 & values[:,5) <2)

new_values=values(diff_temp,:)

Is it clear?

Thanks
Cedric



More information about the Python-list mailing list