title: Generate a list from another list with dates
body: <p>So I have the following list of dates</p>
  
  <pre><code>list_dates=[np.datetime64('2018-06-11'),np.datetime64('2018-01-01'),
  np.datetime64('2018-03-02'),np.datetime64('2018-03-11'),
  np.datetime64('2018-05-19'),np.datetime64('2017-03-19'),
  np.datetime64('2018-01-01'),np.datetime64('2017-05-30'),
  np.datetime64('2016-08-11'),np.datetime64('2016-06-04')]
  </code></pre>
  
  <p>I would like to generate a new list only with those dates with the months of january and march.</p>
  
  <p>The desired output would look something like this:</p>
  
  <pre><code>[np.datetime64('2018-01-01'),np.datetime64('2018-03-02'),np.datetime64('2017-03-19'),
  np.datetime64('2016-03-11')]
  </code></pre>
  
  <p>I was thinking I was treating with strings  so I did this </p>
  
  <pre><code> dates_selected=[x for x in list_dates if "-03-" in x ]+
                  [x for x in list_dates if "-01-" in x ]
  </code></pre>
  
  <p>The problem is that I recieved an ouput indicating that: </p>
  
  <pre><code>TypeError: arguments of type numpy.datetime64 is not iterable
  </code></pre>
  
  <p>How could I obtain the desired ouput considering I am treating with datetime64 instead of strings?</p>