home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 870312451

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
870312451 MDExOlB1bGxSZXF1ZXN0NjI1NTMwMDQ2 5233 Calendar utilities 20629530 closed 0     16 2021-04-28T20:01:33Z 2021-12-30T22:54:49Z 2021-12-30T22:54:11Z CONTRIBUTOR   0 pydata/xarray/pulls/5233
  • [x] Closes #5155
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [x] New functions/methods are listed in api.rst

So:

  • Added coding.cftime_offsets.date_range and coding.cftime_offsets.date_range_like The first simply swtiches between pd.date_range and xarray.cftime_range according to the arguments. The second infers start, end and freq from an existing datetime array and returns a similar range in another calendar.

  • Added coding/calendar_ops.py with convert_calendar and interp_calendar Didn't know where to put them, so there they are.

  • Added DataArray.dt.calendar. When the datetime objects are backed by numpy, it always return "proleptic_gregorian".

I'm not sure where to expose the function. Should the range-generators be accessible directly like xr.date_range?

The convert_calendar and interp_calendar could be implemented as methods of DataArray and Dataset, should I do that?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5233/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 16 rows from issue in issue_comments
Powered by Datasette · Queries took 0.775ms · About: xarray-datasette