title: Extract items from array: between given values/conditions
body: <p>I have a number of timeseries data in arrays and wish to extract values between given dates in the simplest way possible avoiding loops.
  Here's an example:</p>
  
  <pre><code>from numpy import *
  from datetime import *
  
  # datetime array
  date_a=array([
  datetime(2000,1,1),
  datetime(2000,1,2),
  datetime(2000,1,3),
  datetime(2000,1,4),
  datetime(2000,1,5),
  ])
  
  # item array, indices corresponding to datetime array
  item_a=array([1,2,3,4,5])
  
  # extract items in a certain date range
  # after a certain date, works fine
  item_b=item_a[date_a &gt;= (datetime(2000,1,3))] #Out: array([3, 4, 5])
  
  # between dates ?
  item_c=item_a[date_a &gt;= (datetime(2000,1,3)) and date_a &lt;= (datetime(2000,1,4))]
  # returns: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>Is there a one-line solution to this? I have looked at numpy <code>any()</code> and <code>all()</code>, and also <code>where()</code>, without being able to find a solution. I appreciate any help and point-in-direction!</p>