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 919595236,MDExOlB1bGxSZXF1ZXN0NjY4ODk3OTc0,5464,Allow plotting categorical data,14371165,closed,0,,,3,2021-06-12T15:51:34Z,2021-07-18T21:19:21Z,2021-06-21T17:45:39Z,MEMBER,,0,pydata/xarray/pulls/5464," - [x] Closes #4260 - [x] Tests added - [x] Passes `pre-commit run --all-files` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ```python a = xr.DataArray( [0, 1, 2], dims=(""dim_1""), coords=dict(dim_1=([""dim_1""], [""u"", ""v"", ""w""])), ) a.plot() ``` ![image](https://user-images.githubusercontent.com/14371165/121782053-0a23e180-cba8-11eb-9524-46bfe8c94b35.png) ```python a = xr.DataArray( [[0, 1, 2], [3, 4, 5]], dims=(""dim_0"", ""dim_1""), coords=dict(dim_0=([""dim_0""], [0, 1]), dim_1=([""dim_1""], [""u"", ""v"", ""w""])), ) a.plot() ``` ![image](https://user-images.githubusercontent.com/14371165/121781955-89fd7c00-cba7-11eb-8032-9b562f288621.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5464/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 925664972,MDExOlB1bGxSZXF1ZXN0Njc0MDg1Mjk3,5502,Use integer type hints in chunk functions ,14371165,closed,0,,,7,2021-06-20T19:18:58Z,2021-07-02T16:07:43Z,2021-06-21T07:10:32Z,MEMBER,,0,pydata/xarray/pulls/5502,"Attempt to fix errors found in #5365. I've changed it to integers because when does it ever make sense to input 1.5 or a complex number? It will always be forced to integers anyway: https://github.com/dask/dask/blob/8aea537d925b794a94f828d35211a5da05ad9dce/dask/array/core.py#L2815 Integers don't work with Numbers: ``` xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] ``` Floats don't work with Numbers: ``` xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type ""Hashable"": ""float""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type ""Hashable"": ""float""; expected ""Hashable"": ""Union[None, Number, Tuple[Number, ...]]"" [dict-item] ``` This workaround seems related to: https://github.com/python/mypy/issues/3186 - [ ] Closes #xxxx - [ ] Tests added - [ ] Passes `pre-commit run --all-files` - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5502/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull