<p dir="auto"><a href="http://stackoverflow.com/questions/28857937/trying-to-check-data-frequency-with-pandas-series-of-datetime64-objects/28858228?noredirect=1#comment45982435_28858228" rel="nofollow">http://stackoverflow.com/questions/28857937/trying-to-check-data-frequency-with-pandas-series-of-datetime64-objects/28858228?noredirect=1#comment45982435_28858228</a></p>
<p dir="auto">It works fine with <code class="notranslate">datetime64</code>. Currently you have to convert to datetime in order to check allclose</p>
<p dir="auto"><code class="notranslate">numpy.isfinite</code> should support <code class="notranslate">datetime64</code> and <code class="notranslate">timedelta64</code> objects.  It should return <code class="notranslate">True</code> for any ordinary value, and <code class="notranslate">False</code> for <code class="notranslate">datetime64('NaT')</code> and <code class="notranslate">timedelta64('NaT')</code>.</p>
<p dir="auto">As a side-effect, this will make <code class="notranslate">isclose</code> and <code class="notranslate">allclose</code> usable for <code class="notranslate">datetime64</code> and <code class="notranslate">timedelta64</code> objects.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [97]: numpy.isfinite(numpy.datetime64(10**9, 's'))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-97-8555b18406e5&gt; in &lt;module&gt;()
----&gt; 1 numpy.isfinite(numpy.datetime64(10**9, 's'))

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''"><pre class="notranslate"><code class="notranslate">In [97]: numpy.isfinite(numpy.datetime64(10**9, 's'))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-97-8555b18406e5&gt; in &lt;module&gt;()
----&gt; 1 numpy.isfinite(numpy.datetime64(10**9, 's'))

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
</code></pre></div>