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 646130205,MDU6SXNzdWU2NDYxMzAyMDU=,4185,Keep single-value coordinates as dimensions,3801015,closed,0,,,3,2020-06-26T09:20:23Z,2022-04-18T03:49:25Z,2022-04-18T03:49:25Z,CONTRIBUTOR,,,,"**Why** Currently, operations like `.sel`, `.isel`, `.unstack` (and many others) will choose to have a non-dimension coordinate when an index would have just a single value in it. For `.sel` and `.isel` you can avoid this by selecting a single element list, but `.unstack` this becomes a problem. However, given that these methods have a `drop` argument, and `.squeeze(drop=True)` exists to get rid of a dimension, I tend not to ever want the behaviour of the non-dimension coordinate - it no longer aligns on this coordinate when using operators, and to all effects behaves like that coordinate is not there, only remembering it for `concat`. **Suggested feature** A global option (settable via `xr.set_options(...)`) to enforce that any length 1 coordinate is always kept as a dimension. Ideally I'd like it so that this were the default behaviour, but I imagine the back-compatability problems that would generate would make it too unlikely a feature, but having a global option to change to this behaviour would be good enough.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4185/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 954574705,MDExOlB1bGxSZXF1ZXN0Njk4NDQ3NTUy,5640,Fix performance bug from cftime import,3801015,closed,0,,,11,2021-07-28T07:44:06Z,2021-09-29T16:34:00Z,2021-09-29T16:05:57Z,CONTRIBUTOR,,0,pydata/xarray/pulls/5640," No functional change, just removes a terrible perfomance bug when cftime isn't installed - previously calls to `.sel` would search your whole python path for trying to import cftime, leading to progams of mine taking 10% of time just doing this against a slow filesystem. Tests all pass localy. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5640/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 908464731,MDU6SXNzdWU5MDg0NjQ3MzE=,5424,Bottleneck bug with unusual strides - causes segfault or wrong number,3801015,closed,0,,,4,2021-06-01T16:13:12Z,2021-08-12T14:41:33Z,2021-08-12T14:41:33Z,CONTRIBUTOR,,,,"```python import numpy as np import xarray as xr data = np.zeros((1,500, 2)).transpose(1,2,0) xarr = xr.DataArray(data, coords=[('A', range(500)), ('B', [0,1]), ('C', [0])]) xarr.max() ``` The above either returns a very large non-zero number or segfaults. Due to https://github.com/pydata/bottleneck/issues/381. Dual posting here in case this isn't able to get quickly fixed in bottleneck, as this is a pretty severe bug - especially on the occaions it returns the wrong number rather than segfaulting. **Environment**: ``` INSTALLED VERSIONS ------------------ commit: None python: 3.7.7 (default, Mar 26 2020, 15:48:22) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-1160.21.1.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: None xarray: 0.14.1 pandas: 0.25.0 numpy: 1.16.6 scipy: 1.4.1 netCDF4: None pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2.10.1 distributed: 2.10.0 matplotlib: 3.1.3 cartopy: None seaborn: 0.10.0 numbagg: installed setuptools: 46.1.3.post20200330 pip: 20.0.2 conda: None pytest: 5.2.4 IPython: 7.20.0 sphinx: 2.4.4 ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5424/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue