home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 387914727

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/2104#issuecomment-387914727 https://api.github.com/repos/pydata/xarray/issues/2104 387914727 MDEyOklzc3VlQ29tbWVudDM4NzkxNDcyNw== 6815844 2018-05-10T00:29:12Z 2018-05-10T08:45:30Z MEMBER

Thanks, @fmaussion I didn't realize that scipy.interpolate.interpn does not sort the original coordinates (interp1d does). Thanks for pointing this out!

The implementation for you would be straightforward, you'd just have to pass np.arange(NN) to scipy instead of the actual coordinates.

As the interpolation routine can also be used for non-uniform gridded data, I don't think passing np.arange(NN) to scipy is a good idea (it will change the result if higher order method such as 'cubic' is used). Instead, I would like to call sortby in our interp routine, so that the array passed to scipy is always sorted in the ascending order.

The new API I would propose is python da.interp(x=[0, 1, 2], method='linear', assume_sorted=False, kwargs={'bounds_error': False, 'fill_value': 'extrapolate'}) with a new keyword assume_sorted.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  320275317
Powered by Datasette · Queries took 0.472ms · About: xarray-datasette