home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 320297159

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/1272#issuecomment-320297159 https://api.github.com/repos/pydata/xarray/issues/1272 320297159 MDEyOklzc3VlQ29tbWVudDMyMDI5NzE1OQ== 4992424 2017-08-04T16:45:56Z 2017-08-19T18:23:06Z NONE

Okay, it was a bit of effort but I implemented upsampling. For the padding methods I just re-index the Dataset or DataArray using the re-sampled time frequencies. I also added interpolation, but that was a bit tricky; we have to sort of break the split-apply-combine idiom to do that, so I created a Resampler mix-in which could contain the logic for the up-sampling. The DatasetResampler and DataArrayResampler each then implement similar logic for doing the interpolation. The up-sampling is designed to work with n-dimensional data.

The padding methods work 100% with dask arrays - since we're just calling xarray methods which themselves work with dask arrays! There are some eager computations (just the calculation of the up-sampled time frequencies) but I don't think that's a major issue; the actual re-indexing/padding is deferred. Interpolation works with dask arrays too, but eagerly does the computations.

Could use a review from @shoyer or @jhamman.

New TODO list:

  • [ ] Add example chart to the timeseries doc page comparing the different upsampling options
  • [x] Additional up-sampling test cases for both DataArrays and Datasets
  • [x] Code clean-up
  • [x] What's new
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  208215185
Powered by Datasette · Queries took 0.942ms · About: xarray-datasette