title: Numpy: Check if float array contains whole numbers
body: <p>In Python, it is possible to check if a <code>float</code> contains an integer value using <code>n.is_integer()</code>, based on this QA: <a href="https://stackoverflow.com/questions/21583758/how-to-check-if-a-float-value-is-a-whole-number">How to check if a float value is a whole number</a>.</p>
  
  <p>Does numpy have a similar operation that can be applied to arrays? Something that would allow the following:</p>
  
  <pre><code>&gt;&gt;&gt; x = np.array([1.0 2.1 3.0 3.9])
  &gt;&gt;&gt; mask = np.is_integer(x)
  &gt;&gt;&gt; mask
  array([True, False, True, False], dtype=bool)
  </code></pre>
  
  <p>It is possible to do something like</p>
  
  <pre><code>&gt;&gt;&gt; mask = (x == np.floor(x))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt;&gt;&gt; mask = (x == np.round(x))
  </code></pre>
  
  <p>but they involve calling extra methods and creating a bunch of temp arrays that could be potentially avoided.</p>
  
  <p>Does numpy have a vectorized function that checks for fractional parts of floats in a way similar to Python's <code>float.is_integer</code>?</p>