<p dir="auto">scipy 1.0.1, Anaconda 5, Linux 64 bit</p>
<p dir="auto">When y is a N-dimensional array, I would expect interp1d to work independently on each series.<br>
When invoked with <code class="notranslate">kind='quadratic'</code> or <code class="notranslate">kind='cubic'</code>, however, if <em>any</em> series contains NaNs then the interpolated values of <em>all</em> series will be NaN:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy
from scipy.interpolate import *

x = numpy.arange(0, 8, 1)
y = numpy.stack([numpy.arange(0, 80, 10), numpy.full((8, ), numpy.nan)], axis=1)
print(&quot;x =&quot;, x)
print(&quot;y =&quot;, y)

for kind in ('nearest', 'linear', 'zero', 'slinear', 'quadratic', 'cubic'):
    print(kind + ' =', interp1d(x, y, axis=0, kind=kind)(4.5))
print(&quot;Akima =&quot;, Akima1DInterpolator(x, y, axis=0)(4.5))
print(&quot;PCHIP =&quot;, PchipInterpolator(x, y, axis=0)(4.5))"><pre class="notranslate"><code class="notranslate">import numpy
from scipy.interpolate import *

x = numpy.arange(0, 8, 1)
y = numpy.stack([numpy.arange(0, 80, 10), numpy.full((8, ), numpy.nan)], axis=1)
print("x =", x)
print("y =", y)

for kind in ('nearest', 'linear', 'zero', 'slinear', 'quadratic', 'cubic'):
    print(kind + ' =', interp1d(x, y, axis=0, kind=kind)(4.5))
print("Akima =", Akima1DInterpolator(x, y, axis=0)(4.5))
print("PCHIP =", PchipInterpolator(x, y, axis=0)(4.5))
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = [0 1 2 3 4 5 6 7]
y = [[ 0. nan]
 [10. nan]
 [20. nan]
 [30. nan]
 [40. nan]
 [50. nan]
 [60. nan]
 [70. nan]]
nearest = [40. nan]
linear = [45. nan]
zero = [40. nan]
slinear = [45. nan]
quadratic = [nan nan]
cubic = [nan nan]
Akima = [45. nan]
PCHIP = [45. nan]"><pre class="notranslate"><code class="notranslate">x = [0 1 2 3 4 5 6 7]
y = [[ 0. nan]
 [10. nan]
 [20. nan]
 [30. nan]
 [40. nan]
 [50. nan]
 [60. nan]
 [70. nan]]
nearest = [40. nan]
linear = [45. nan]
zero = [40. nan]
slinear = [45. nan]
quadratic = [nan nan]
cubic = [nan nan]
Akima = [45. nan]
PCHIP = [45. nan]
</code></pre></div>
<p dir="auto">Hi,</p>
<p dir="auto">I have a request for the following case.  Let's say I have a N-Dimensional vector of features for each timestamp in a time-series. So a N+1 dimensional data cube. I want to interpolate each feature, side-by-side in the direction of the time-series (1D interpolation).</p>
<p dir="auto">Currently the <code class="notranslate">scipy.interpolate.interp1d</code> allows for the side-by-side interpolation of a N-dimensional array in one specific direction, which is great.<br>
However, in case you have missing (NaN) data randomly distributed over the N+1-dimensional time-series, this then doesn't apply anymore but is often the case.</p>
<p dir="auto">One option is to add the time-series also as a N+1-dimensional array, corresponding to the data values. Currently, this would then be like interpolation with grid data, but that is the multi-dimensional interpolation, It would be good to have this option also for 1D interpolation (single direction)</p>
<p dir="auto">Another option would be by adding some sort of a mask, or boolean weights to the interp1d function, which would be the same shape as the data array, specifying which data points to actually take into account.</p>
<p dir="auto">Option number 3 would be to add a value which should be ignored and not taken into account in the interpolation, this seems the easiest.</p>
<p dir="auto">I would greatly appreciate this, coming as someone in the field of earth-observation, where missing data is very common.</p>
<p dir="auto">Regards,<br>
Matic</p>