<p dir="auto"><code class="notranslate">scipy.ndimage.measurements.label()</code> has the following lines:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    # Use 32 bits if it's large enough for this image.
    # _ni_label.label()  needs two entries for background and
    # foreground tracking
    need_64bits = input.size &lt; (2**31 - 2)"><pre class="notranslate"><code class="notranslate">    # Use 32 bits if it's large enough for this image.
    # _ni_label.label()  needs two entries for background and
    # foreground tracking
    need_64bits = input.size &lt; (2**31 - 2)
</code></pre></div>
<p dir="auto">I think that <code class="notranslate">&lt;</code> should be replaced with <code class="notranslate">&gt;=</code>.</p>
<p dir="auto">Not sure if this is a bug more an additional check / documentation issue but <code class="notranslate">interpolate.interp1d</code> gives an unexpected results with non-monotonic x data e.g. <code class="notranslate">x=[1, 2, 2, 3], y=[1, 2, 3, 4]</code> using the defaults. Trying the same with any of the spline methods raises an error (<code class="notranslate">ValueError: Expect x to not have duplicates</code>) I would expect the same behaviour from 'linear' rather than returning values?</p>
<h4 dir="auto">Reproducing code example:</h4>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from scipy.interpolate import interp1d
x = [1, 2, 2, 3]
y = [1, 2, 3, 4]
my_interp = interp1d(x, y)
res = my_interp(x)
print(y, res)

#my_interp = interp1d(x, y, 'cubic') raises ValueError

from matplotlib import pyplot as plt
plt.plot(x, y, '-k.', label='Original')
plt.plot(x, out, '--rx', label='Interpolated')
plt.legend()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">interpolate</span> <span class="pl-k">import</span> <span class="pl-s1">interp1d</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]
<span class="pl-s1">y</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>]
<span class="pl-s1">my_interp</span> <span class="pl-c1">=</span> <span class="pl-en">interp1d</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>)
<span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-en">my_interp</span>(<span class="pl-s1">x</span>)
<span class="pl-en">print</span>(<span class="pl-s1">y</span>, <span class="pl-s1">res</span>)

<span class="pl-c">#my_interp = interp1d(x, y, 'cubic') raises ValueError</span>

<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s">'-k.'</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">'Original'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">out</span>, <span class="pl-s">'--rx'</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">'Interpolated'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">legend</span>()</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24570854/91542020-1ab6e400-e915-11ea-9821-f22f47c58688.png"><img src="https://user-images.githubusercontent.com/24570854/91542020-1ab6e400-e915-11ea-9821-f22f47c58688.png" alt="iterp_issue" style="max-width: 100%;"></a></p>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<p dir="auto">1.5.2 1.19.1 sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0)</p>