You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with the differing behavior between giving an xarray object to scipy's interpolating functions (particularly the RegularGridInterpolator and the one xarray's interpn is based on) versus giving a numpy array. When giving the interpolator a numpy array, I get a 1D array returned with one value for every point given. When an xarray object is given instead, I get an N dimensional array, as if a np.meshgrid statement is executed on the given points. I have provided more detail at the link below. This differing return behavior and the additional demand for the calculation for a grid made from the points (rather than the points themselves) is much slower than the numpy approach, but I can't use numpy arrays for medium data (because it won't all fit in my memory). Can a feature be added, maybe a 'numpy-like' keyword, to xarray's version of the scipy interpolator to only execute for the points given rather than a grid made from the points? Such a keyword would enable backwards-compatibility and reduce the computational demand for those interested in interpolating along a curved trajectory (such as in my case).
Note: the same differing behavior occurs when I give scipy's RegularGridInterpolator an xarray object.
I'm having trouble with the differing behavior between giving an xarray object to scipy's interpolating functions (particularly the RegularGridInterpolator and the one xarray's interpn is based on) versus giving a numpy array. When giving the interpolator a numpy array, I get a 1D array returned with one value for every point given. When an xarray object is given instead, I get an N dimensional array, as if a np.meshgrid statement is executed on the given points. I have provided more detail at the link below. This differing return behavior and the additional demand for the calculation for a grid made from the points (rather than the points themselves) is much slower than the numpy approach, but I can't use numpy arrays for medium data (because it won't all fit in my memory). Can a feature be added, maybe a 'numpy-like' keyword, to xarray's version of the scipy interpolator to only execute for the points given rather than a grid made from the points? Such a keyword would enable backwards-compatibility and reduce the computational demand for those interested in interpolating along a curved trajectory (such as in my case).
Note: the same differing behavior occurs when I give scipy's RegularGridInterpolator an xarray object.
scipy/scipy#14824 (comment)
The text was updated successfully, but these errors were encountered: