select elements in list satisfying some conditions in python
<p>I want to get the list of elements satisfying some condition. This is my code</p>

<pre><code> year=3.11E7
 years=[year,5*year,10*year,20*year,30*year]    
  for well in domain :
      if well.is_producer:
         location=well.center+well.radius
         for name in wellcontours.keys() :
             for tau in years:
                 L=[filter(lambda tau: tau==[location], fronts)]
                 print L
</code></pre>

<p>tau is list of points in contours, fronts is list of contours, I want to select points, which is equal for well location. It should be also list of points.(but NOT all points, that I already have )
and it give me </p>

<pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
</code></pre>

<p>How can I fix it?</p>
