Skip to content

extrapolate not working for multi-dimentional data #6189

Answered by andersy005
zxdawn asked this question in Q&A
Discussion options

You must be logged in to vote

@zxdawn,

Thank you for the thorough, reproducible example.

Per Scipy's documentation, RegularGridInterpolator uses fill_value=None for extrapolation

In [23]: da.interp(x=x, y=y, kwargs={"fill_value": None})

Out[23]: 
<xarray.DataArray (z: 3)>
array([-0.26074336,  0.63496063, -0.46643289])
Coordinates:
    x        (z) float64 -0.5 1.5 2.5
    y        (z) float64 0.15 0.25 0.35
Dimensions without coordinates: z

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@zxdawn
Comment options

@zxdawn
Comment options

Answer selected by andersy005
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #6188 on January 24, 2022 22:34.