<p dir="auto">Seems to me that timedelta should be able to accept numpy integers as input, but it can't:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import sys, numpy
&gt;&gt;&gt; sys.version
'3.4.3 |Continuum Analytics, Inc.| (default, Mar  6 2015, 12:03:53) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'
&gt;&gt;&gt; numpy.version.version
'1.9.2'
&gt;&gt;&gt; np.timedelta64(4, 'm')
numpy.timedelta64(4,'m')
&gt;&gt;&gt; np.timedelta64(np.int64(4), 'm')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-10-432735e2a44e&gt; in &lt;module&gt;()
----&gt; 1 np.timedelta64(np.int64(4), 'm')

ValueError: Could not convert object to NumPy timedelta"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import sys, numpy
&gt;&gt;&gt; sys.version
'3.4.3 |Continuum Analytics, Inc.| (default, Mar  6 2015, 12:03:53) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'
&gt;&gt;&gt; numpy.version.version
'1.9.2'
&gt;&gt;&gt; np.timedelta64(4, 'm')
numpy.timedelta64(4,'m')
&gt;&gt;&gt; np.timedelta64(np.int64(4), 'm')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-10-432735e2a44e&gt; in &lt;module&gt;()
----&gt; 1 np.timedelta64(np.int64(4), 'm')

ValueError: Could not convert object to NumPy timedelta
</code></pre></div>
<p dir="auto">This is numpy installed via conda on kubuntu 14.04</p>
<p dir="auto">Not sure if this is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7731623" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2543" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2543/hovercard" href="https://github.com/numpy/numpy/issues/2543">#2543</a></p>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.datetime64(1478476800, &quot;s&quot;)
numpy.datetime64('2016-11-07T00:00:00')

&gt;&gt;&gt; np.datetime64(np.int64(1478476800), &quot;s&quot;)
ValueError: Could not convert object to NumPy datetime

&gt;&gt;&gt; np.timedelta64(1, &quot;s&quot;)
numpy.timedelta64(1,'s')

&gt;&gt;&gt; np.timedelta64(np.int64(1), &quot;s&quot;)
ValueError: Could not convert object to NumPy timedelta"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">datetime64</span>(<span class="pl-c1">1478476800</span>, <span class="pl-s">"s"</span>)
<span class="pl-s1">numpy</span>.<span class="pl-en">datetime64</span>(<span class="pl-s">'2016-11-07T00:00:00'</span>)

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">datetime64</span>(<span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">1478476800</span>), <span class="pl-s">"s"</span>)
<span class="pl-v">ValueError</span>: <span class="pl-v">Could</span> <span class="pl-c1">not</span> <span class="pl-s1">convert</span> <span class="pl-s1">object</span> <span class="pl-s1">to</span> <span class="pl-v">NumPy</span> <span class="pl-s1">datetime</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">timedelta64</span>(<span class="pl-c1">1</span>, <span class="pl-s">"s"</span>)
<span class="pl-s1">numpy</span>.<span class="pl-en">timedelta64</span>(<span class="pl-c1">1</span>,<span class="pl-s">'s'</span>)

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">timedelta64</span>(<span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">1</span>), <span class="pl-s">"s"</span>)
<span class="pl-v">ValueError</span>: <span class="pl-v">Could</span> <span class="pl-c1">not</span> <span class="pl-s1">convert</span> <span class="pl-s1">object</span> <span class="pl-s1">to</span> <span class="pl-v">NumPy</span> <span class="pl-s1">timedelta</span></pre></div>