home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 828355557

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/issues/5228#issuecomment-828355557 https://api.github.com/repos/pydata/xarray/issues/5228 828355557 MDEyOklzc3VlQ29tbWVudDgyODM1NTU1Nw== 4441338 2021-04-28T10:46:59Z 2021-04-28T10:46:59Z NONE

I think I should have not expected a simple slice to make the choices that are necessary for evenly sampling a possibly irregular index. Assuming most users won't, I'm closing this. Below is what I'm using now. python def make_intervals(a,b,c): return a+np.arange(0,1+int(np.floor((b-a)/c)))*c print(d.sel(dim0=make_intervals(0,1,.1),method='nearest',tolerance=.01)) <xarray.DataArray (dim0: 11)> array([ 0, 10, 20, 30, 40, 49, 59, 69, 79, 89, 99]) Coordinates: * dim0 (dim0) float64 0.0 0.101 0.202 0.303 ... 0.697 0.798 0.899 1.0

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