Correct. I thought just multiplying by -1 and inverting the logical  
condition would give me the same output.

This makes exactly what I want:

>>> x= numpy.arange(10.)
>>> delta=3
>>> y=[x[0]]
>>> for value in x:
> ...     if (value-y[-1]) < delta:
> ...        y.append(value)
> ...
>>> y
[0., 4., 8.]


Armando

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to