issues: 334778045
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 334778045 | MDU6SXNzdWUzMzQ3NzgwNDU= | 2244 | Implement shift for CFTimeIndex | 6063709 | closed | 0 | 3 | 2018-06-22T07:42:16Z | 2018-10-02T14:44:30Z | 2018-10-02T14:44:30Z | CONTRIBUTOR | Code Sample```python import numpy as np import xarray as xr import pandas as pd from cftime import num2date, DatetimeNoLeap times = num2date(np.arange(730), calendar='noleap', units='days since 0001-01-01') da = xr.DataArray(np.arange(730), coords=[times], dims=['time']) ``` Problem descriptionI am trying to shift a time index as I need to align datasets to a common start point. Directly incrementing one of the
If I want to shift a time index is the only way currently is to loop over all the individual elements of the index and add a time offset to each. Expected OutputI would expect to have CFTimeIndex shifted by the desired time delta. Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2244/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |