<p dir="auto">Numpy.clip does not seem to correctly mantain the dtype of the clipped array with some clipping min and max values.<br>
In particular, we found out that the max (and/or min) values that can be used as clipping values is 2^62, any higher number gives a different dtype wrt to the original unclipped array.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np

a = np.array([1,2,3,4,5])
# returns int64
print(a.dtype)

i = - int(np.exp2(64))
j = int(np.exp2(64))
ac = np.clip(a,i,j)
# returns object
print(ac.dtype)

i = - int(np.exp2(63))
j = int(np.exp2(63))
ac = np.clip(a,i,j)
# returns float64
print(ac.dtype)

i = - int(np.exp2(62))
j = int(np.exp2(62))
ac = np.clip(a,i,j)
# returns int64 again
print(ac.dtype)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</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-c1">5</span>])
<span class="pl-c"># returns int64</span>
<span class="pl-en">print</span>(<span class="pl-s1">a</span>.<span class="pl-s1">dtype</span>)

<span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">-</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">64</span>))
<span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">64</span>))
<span class="pl-s1">ac</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">clip</span>(<span class="pl-s1">a</span>,<span class="pl-s1">i</span>,<span class="pl-s1">j</span>)
<span class="pl-c"># returns object</span>
<span class="pl-en">print</span>(<span class="pl-s1">ac</span>.<span class="pl-s1">dtype</span>)

<span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">-</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">63</span>))
<span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">63</span>))
<span class="pl-s1">ac</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">clip</span>(<span class="pl-s1">a</span>,<span class="pl-s1">i</span>,<span class="pl-s1">j</span>)
<span class="pl-c"># returns float64</span>
<span class="pl-en">print</span>(<span class="pl-s1">ac</span>.<span class="pl-s1">dtype</span>)

<span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">-</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">62</span>))
<span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp2</span>(<span class="pl-c1">62</span>))
<span class="pl-s1">ac</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">clip</span>(<span class="pl-s1">a</span>,<span class="pl-s1">i</span>,<span class="pl-s1">j</span>)
<span class="pl-c"># returns int64 again</span>
<span class="pl-en">print</span>(<span class="pl-s1">ac</span>.<span class="pl-s1">dtype</span>)</pre></div>
<p dir="auto">As stated above, the output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="int64
object
float64
int64"><pre class="notranslate"><code class="notranslate">int64
object
float64
int64
</code></pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto"><strong>numpy.version</strong>: 1.18.1<br>
<strong>sys.version</strong>: 3.8.2 (default, Mar 10 2020, 15:23:31)</p>
<p dir="auto">This issue is probably a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="429688099" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/13267" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/13267/hovercard" href="https://github.com/numpy/numpy/issues/13267">#13267</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="304521631" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/10736" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/10736/hovercard" href="https://github.com/numpy/numpy/issues/10736">#10736</a>, but I think that it could be interesting to know what people think what <code class="notranslate">interpolation</code> should do. The results surprised me.</p>
<h3 dir="auto">Reproducing code example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np

x = [0, 0, 0, 0, 3, 3, 3, 3]

methods = ['linear', 'lower', 'higher', 'nearest', 'midpoint']

for method in methods:
    print(method)
    print(&quot;=&quot; * len(method))

    for i in range(0, 110, 10):
        whitespace = ' ' * (3 - len(str(i)))
        print(whitespace + '{0:}-th percentile: {1}'.format(
            i, np.percentile(x, i, interpolation=method)))
    
    print()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-s1">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>]

<span class="pl-s1">methods</span> <span class="pl-c1">=</span> [<span class="pl-s">'linear'</span>, <span class="pl-s">'lower'</span>, <span class="pl-s">'higher'</span>, <span class="pl-s">'nearest'</span>, <span class="pl-s">'midpoint'</span>]

<span class="pl-k">for</span> <span class="pl-s1">method</span> <span class="pl-c1">in</span> <span class="pl-s1">methods</span>:
    <span class="pl-en">print</span>(<span class="pl-s1">method</span>)
    <span class="pl-en">print</span>(<span class="pl-s">"="</span> <span class="pl-c1">*</span> <span class="pl-en">len</span>(<span class="pl-s1">method</span>))

    <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">0</span>, <span class="pl-c1">110</span>, <span class="pl-c1">10</span>):
        <span class="pl-s1">whitespace</span> <span class="pl-c1">=</span> <span class="pl-s">' '</span> <span class="pl-c1">*</span> (<span class="pl-c1">3</span> <span class="pl-c1">-</span> <span class="pl-en">len</span>(<span class="pl-en">str</span>(<span class="pl-s1">i</span>)))
        <span class="pl-en">print</span>(<span class="pl-s1">whitespace</span> <span class="pl-c1">+</span> <span class="pl-s">'{0:}-th percentile: {1}'</span>.<span class="pl-en">format</span>(
            <span class="pl-s1">i</span>, <span class="pl-s1">np</span>.<span class="pl-en">percentile</span>(<span class="pl-s1">x</span>, <span class="pl-s1">i</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s1">method</span>)))
    
    <span class="pl-en">print</span>()</pre></div>

<h3 dir="auto">Actual output</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="linear
======
  0-th percentile: 0.0
 10-th percentile: 0.0
 20-th percentile: 0.0
 30-th percentile: 0.0
 40-th percentile: 0.0
 50-th percentile: 1.5
 60-th percentile: 3.0
 70-th percentile: 3.0
 80-th percentile: 3.0
 90-th percentile: 3.0
100-th percentile: 3.0

lower
=====
  0-th percentile: 0
 10-th percentile: 0
 20-th percentile: 0
 30-th percentile: 0
 40-th percentile: 0
 50-th percentile: 0
 60-th percentile: 3
 70-th percentile: 3
 80-th percentile: 3
 90-th percentile: 3
100-th percentile: 3

higher
======
  0-th percentile: 0
 10-th percentile: 0
 20-th percentile: 0
 30-th percentile: 0
 40-th percentile: 0
 50-th percentile: 3
 60-th percentile: 3
 70-th percentile: 3
 80-th percentile: 3
 90-th percentile: 3
100-th percentile: 3

nearest
=======
  0-th percentile: 0
 10-th percentile: 0
 20-th percentile: 0
 30-th percentile: 0
 40-th percentile: 0
 50-th percentile: 3
 60-th percentile: 3
 70-th percentile: 3
 80-th percentile: 3
 90-th percentile: 3
100-th percentile: 3

midpoint
========
  0-th percentile: 0.0
 10-th percentile: 0.0
 20-th percentile: 0.0
 30-th percentile: 0.0
 40-th percentile: 0.0
 50-th percentile: 1.5
 60-th percentile: 3.0
 70-th percentile: 3.0
 80-th percentile: 3.0
 90-th percentile: 3.0
100-th percentile: 3.0"><pre class="notranslate"><span class="pl-s1">linear</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>

<span class="pl-s1">lower</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">=</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">higher</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">nearest</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">=</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">midpoint</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span></pre></div>
<h3 dir="auto">Expected output</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="linear
======
  0-th percentile: 0.0
 10-th percentile: 0.3
 20-th percentile: 0.6
 30-th percentile: 0.9
 40-th percentile: 1.2
 50-th percentile: 1.5
 60-th percentile: 1.8
 70-th percentile: 2.1
 80-th percentile: 2.4
 90-th percentile: 2.7
100-th percentile: 3.0

lower
=====
  0-th percentile: 0
 10-th percentile: 0
 20-th percentile: 0
 30-th percentile: 0
 40-th percentile: 0
 50-th percentile: 0
 60-th percentile: 0
 70-th percentile: 0
 80-th percentile: 0
 90-th percentile: 0
100-th percentile: 3

higher
======
  0-th percentile: 0
 10-th percentile: 3
 20-th percentile: 3
 30-th percentile: 3
 40-th percentile: 3
 50-th percentile: 3
 60-th percentile: 3
 70-th percentile: 3
 80-th percentile: 3
 90-th percentile: 3
100-th percentile: 3

nearest
=======
  0-th percentile: 0
 10-th percentile: 0
 20-th percentile: 0
 30-th percentile: 0
 40-th percentile: 0
 50-th percentile: 3
 60-th percentile: 3
 70-th percentile: 3
 80-th percentile: 3
 90-th percentile: 3
100-th percentile: 3

midpoint
========
  0-th percentile: 0.0
 10-th percentile: 1.5
 20-th percentile: 1.5
 30-th percentile: 1.5
 40-th percentile: 1.5
 50-th percentile: 1.5
 60-th percentile: 1.5
 70-th percentile: 1.5
 80-th percentile: 1.5
 90-th percentile: 1.5
100-th percentile: 3.0"><pre class="notranslate"><span class="pl-s1">linear</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.3</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.6</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.9</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.2</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.8</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">2.1</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">2.4</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">2.7</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span>

<span class="pl-s1">lower</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">=</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">higher</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">nearest</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">=</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3</span>

<span class="pl-s1">midpoint</span>
<span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span><span class="pl-c1">==</span>
  <span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">0.0</span>
 <span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">20</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">30</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">40</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">50</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">60</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">70</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">80</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
 <span class="pl-c1">90</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">1.5</span>
<span class="pl-c1">100</span><span class="pl-c1">-</span><span class="pl-s1">th</span> <span class="pl-s1">percentile</span>: <span class="pl-c1">3.0</span></pre></div>
<h3 dir="auto">Observation</h3>
<p dir="auto">The value of <code class="notranslate">interpolation</code> has an impact on the median only, while it should have an impact on all the quantiles that must be interpolated (10, 20, ..., 90) imho.</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import sys, numpy; print(numpy.__version__, sys.version)
1.16.4 3.7.1 (default, Dec 14 2018, 13:28:58) 
[Clang 4.0.1 (tags/RELEASE_401/final)]"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-c1">1.16</span>.<span class="pl-c1">4</span> <span class="pl-c1">3.7</span>.<span class="pl-c1">1</span> (<span class="pl-s1">default</span>, <span class="pl-v">Dec</span> <span class="pl-c1">14</span> <span class="pl-c1">2018</span>, <span class="pl-c1">13</span>:<span class="pl-c1">28</span>:<span class="pl-c1">58</span>) 
[<span class="pl-v">Clang</span> <span class="pl-c1">4.0</span><span class="pl-c1">.1</span> (<span class="pl-s1">tags</span><span class="pl-c1">/</span><span class="pl-v">RELEASE_401</span><span class="pl-c1">/</span><span class="pl-s1">final</span>)]</pre></div>