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
When trying to interpolate an array over a Grid using the interpolate method, an error is returned if the interpolation point is beyond the upper bounds.
Expected behavior
Extrapolate away the data array to interpolate when point lies outside boundaries
Sorry for the delayed response -- thanks for finding this! Actually for grid values that are of type jax.Array instead of np.ndarray (the typical use case, at least for me) it seems that JAX's out-of-bounds indexing behavior has been masking the problem and making the buggy jnp.clip superfluous. Upon reflection, extrapolation probably shouldn't be allowed (or at least should be explicitly controlled by the user) so in addition to fixing the jnp.clip bounds I've changed the extrapolation behavior to return nans in #9.
When trying to interpolate an array over a
Grid
using theinterpolate
method, an error is returned if the interpolation point is beyond the upper bounds.Expected behavior
Extrapolate away the data array to interpolate when point lies outside boundaries
Actual behavior
Raises an
IndexError
Steps to reproduce the behavior
The following example code shows the issue
The text was updated successfully, but these errors were encountered: