Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded call to private scipy function in SAR reader #2968

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions satpy/readers/sar_c_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,14 @@ def intp(grid_x, grid_y, interpolator):

def interpolate_xarray_linear(xpoints, ypoints, values, shape, chunks=CHUNK_SIZE):
"""Interpolate linearly, generating a dask array."""
from scipy.interpolate.interpnd import LinearNDInterpolator, _ndim_coords_from_arrays
from scipy.interpolate.interpnd import LinearNDInterpolator

if isinstance(chunks, (list, tuple)):
vchunks, hchunks = chunks
else:
vchunks, hchunks = chunks, chunks

points = _ndim_coords_from_arrays(np.vstack((np.asarray(ypoints, dtype=np.uint16),
np.asarray(xpoints, dtype=np.uint16))).T)
points = np.vstack((np.asarray(ypoints, dtype=np.uint16),
np.asarray(xpoints, dtype=np.uint16))).T

interpolator = LinearNDInterpolator(points, values)

Expand Down
Loading