issues: 594436316
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 594436316 | MDExOlB1bGxSZXF1ZXN0Mzk5MDYzNDQ1 | 3935 | Add a days_in_month accessor to CFTimeIndex | 6628425 | closed | 0 | 3 | 2020-04-05T12:38:50Z | 2020-04-06T14:02:58Z | 2020-04-06T14:02:11Z | MEMBER | 0 | pydata/xarray/pulls/3935 |
This adds a In [2]: times = xr.cftime_range("2000", periods=24, freq="MS", calendar="noleap") In [3]: da = xr.DataArray(times, dims=["time"]) In [4]: da.dt.days_in_month Out[4]: <xarray.DataArray 'days_in_month' (time: 24)> array([31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]) Coordinates: * time (time) object 2000-01-01 00:00:00 ... 2001-12-01 00:00:00 ``` This simplifies the "Calculating Seasonal Averages from Timeseries of Monthly Means" example @jhamman wrote for the docs a while back, which I've taken the liberty of updating. The ability to add this feature to xarray is thanks in large part to @huard, who added a |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3935/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | pull |