home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1030492705

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
1030492705 PR_kwDOAMm_X84tZNhC 5876 _season_from_months can now handle np.nan 8809578 closed 0     15 2021-10-19T16:04:41Z 2023-01-06T16:59:18Z 2022-01-11T16:06:18Z CONTRIBUTOR   0 pydata/xarray/pulls/5876

_season_from_months can now handle np.nan and values outside of [1,12]

I passed these tests:

``` def test_season(): months = np.array([ 1, 2, 3, 4, 5, np.nan]) assert ( _season_from_months(months) == np.array(['DJF', 'DJF', 'MAM', 'MAM', 'MAM', 'na']) ).all()

months = np.array([ 1, 100, 3, 13, 0, -5])
assert ( _season_from_months(months) == np.array(['DJF', 'na', 'MAM', 'na', 'na', 'na']) ).all()

months = np.array(range(1, 13))
assert ( _season_from_months(months) == np.array(['DJF', 'DJF', 'MAM', 'MAM', 'MAM', 'JJA', 'JJA', 'JJA', 'SON', 'SON', 'SON', 'DJF']) ).all()

test_season() ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5876/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

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