Re: [Numpy-discussion] check for inequalities on a list

2010-05-10 Thread Alan G Isaac
On 5/10/2010 5:42 PM, gerardob wrote: > I would like to check whether lower_bound[i]<= x[i]<= upper_bound[i] for > all i in range(len(x)) >>> import numpy as np >>> l, m, u = np.arange(12).reshape((3,4)) >>> (l <= m) & (m <= u) array([ True, True, True, True], dtype=bool) >>> l[3]=9 >>> (l <=

[Numpy-discussion] check for inequalities on a list

2010-05-10 Thread gerardob
I have three lists of floats of equal lenght: upper_bound, lower_bound and x. I would like to check whether lower_bound[i]<= x[i] <= upper_bound[i] for all i in range(len(x)) Which is the best way to do this? Thanks. -- View this message in context: http://old.nabble.com/check-for-inequalit