home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 455540080

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/2593#issuecomment-455540080 https://api.github.com/repos/pydata/xarray/issues/2593 455540080 MDEyOklzc3VlQ29tbWVudDQ1NTU0MDA4MA== 6628425 2019-01-18T13:07:59Z 2019-01-18T13:07:59Z MEMBER

@jwenfai to provide some more detail for my confusion here -- my impression is that adding or subtracting a datetime.timedelta object from a cftime.datetime object to produce another cftime.datetime object should always be microsecond-exact. See comments in cftime here. This is how a CFTimeIndex is constructed through cftime_range, so at least naively I would not anticipate any precision issues in constructing the bins.

Taking the difference between two dates to produce a timedelta object takes a different code path in cftime, which is not microsecond-precise. This, as we've seen, can induce some small errors in interpolation (because in the process we need to determine the amount of time between each date in the time coordinate and a reference date).

Of the ones I've inspected, the resampled cftime array always has 1 more bin than pandas

Could you provide more details about this example? What were the resample parameters used (e.g. freq, closed, label, base)? Is the extra bin added to the beginning or end of the time range? If you convert to a DatetimeIndex, do all the other bins match exactly, or is there some error?

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