home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1092867975

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
1092867975 I_kwDOAMm_X85BI9eH 6134 [FEATURE]: `CFTimeIndex.shift(float)` 12237157 closed 0     1 2022-01-03T22:33:58Z 2022-02-15T23:05:04Z 2022-02-15T23:05:04Z CONTRIBUTOR      

Is your feature request related to a problem?

CFTimeIndex.shift() allows only int but sometimes I'd like to shift by a float e.g. 0.5.

For small freqs, that shouldnt be a problem as pd.Timedelta allows floats for days and below. For freqs of months and larger, it becomes more tricky. Fractional shifts work for calendar=360 easily, for other calendars thats not possible.

Describe the solution you'd like

CFTimeIndex.shift(0.5, 'D') CFTimeIndex.shift(0.5, 'M') for 360day calendar CFTimeIndex.shift(0.5, 'M') for other calendars fails

Describe alternatives you've considered

solution we have in climpred: https://github.com/pangeo-data/climpred/blob/617223b5bea23a094065efe46afeeafe9796fa97/climpred/utils.py#L657

Additional context

https://xarray.pydata.org/en/stable/generated/xarray.CFTimeIndex.shift.html

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

Links from other tables

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