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 281897468,MDU6SXNzdWUyODE4OTc0Njg=,1778,ValueError on empty selection with dask based DataArrays,3169620,closed,0,,3801867,2,2017-12-13T21:09:42Z,2019-07-12T13:41:08Z,2019-07-12T13:41:08Z,CONTRIBUTOR,,,,"#### Code Sample, a copy-pastable example if possible ```python import xarray as xr import numpy as np da = xr.DataArray(np.random.rand(15), dims=['latitude'], coords={'latitude':np.linspace(90, -90, 15)}) # This gives an empty latitude slice print(da.sel(latitude=slice(20, 60))) # After converting the DataArray to dask... da=da.chunk() # ...this throws a ValueError due to 'conflicting sizes' print(da.sel(latitude=slice(20, 60))) ``` #### Problem description I would expect the dask based DataArray to return an empty slice just as the numpy one does. Although arguably it would be nicer if both returned the latitude values between 20 and 60 - regardless of the direction of the coordinate. Perhaps the sel method could check whether the coordinate is increasing or decreasing? #### Output of ``xr.show_versions()``
# Paste the output here xr.show_versions() here xarray version: 0.9.6 numpy version: 1.13.3 dask version: 0.15.4
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1778/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 293445250,MDU6SXNzdWUyOTM0NDUyNTA=,1877,TypeError for NetCDF float16 output,3169620,closed,0,,,4,2018-02-01T08:39:03Z,2018-02-26T10:46:47Z,2018-02-26T10:46:47Z,CONTRIBUTOR,,,,"```python ds = xr.Dataset({""test"": np.arange(0, 5, dtype='float16')}) ds.to_netcdf('test.nc') ``` This fails because the float16 type doesn't exist for NetCDF files, throwing an `TypeError: illegal primitive data type.` It might be nice if the xarray netCDF engine promoted this to float32 instead. #### Output of ``xr.show_versions()``
INSTALLED VERSIONS ------------------ commit: None python: 3.6.4.final.0 python-bits: 64 OS: Linux OS-release: 3.11.0-26-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 xarray: 0.10.0 pandas: 0.22.0 numpy: 1.14.0 scipy: 1.0.0 netCDF4: 1.3.1 h5netcdf: 0.5.0 Nio: None bottleneck: 1.2.1 cyordereddict: None dask: 0.16.1 matplotlib: 2.1.2 cartopy: 0.15.1 seaborn: 0.8.1 setuptools: 38.4.0 pip: 9.0.1 conda: None pytest: None IPython: 6.2.1 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1877/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 278286073,MDExOlB1bGxSZXF1ZXN0MTU1NzMxMjI3,1750,xarray to and from Iris,3169620,closed,0,,,16,2017-11-30T22:04:46Z,2018-01-03T10:19:16Z,2017-12-20T15:14:17Z,CONTRIBUTOR,,0,pydata/xarray/pulls/1750," - [x] Closes #621 and #37 - finishes #814 - [x] Tests added / passed - [x] Passes ``git diff upstream/master **/*py | flake8 --diff`` - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1750/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 273459295,MDU6SXNzdWUyNzM0NTkyOTU=,1715,Error accessing isnull() and notnull() on Dataset,3169620,closed,0,,,3,2017-11-13T14:59:30Z,2017-11-13T16:07:01Z,2017-11-13T16:07:01Z,CONTRIBUTOR,,,,"#### Code Sample, a copy-pastable example if possible ```python # Create basic Dataset import numpy as np import pandas as pd import xarray as xr temp = 15 + 8 * np.random.randn(2, 2, 3) precip = 10 * np.random.rand(2, 2, 3) lon = [[-99.83, -99.32], [-99.79, -99.23]] lat = [[42.25, 42.21], [42.63, 42.59]] # for real use cases, its good practice to supply array attributes such as # units, but we won't bother here for the sake of brevity ds = xr.Dataset({'temperature': (['x', 'y', 'time'], temp), 'precipitation': (['x', 'y', 'time'], precip)}, coords={'lon': (['x', 'y'], lon), 'lat': (['x', 'y'], lat), 'time': pd.date_range('2014-09-06', periods=3), 'reference_time': pd.Timestamp('2014-09-05')}) # Both of these throw attribute errors ds.notnull() # ds.isnull() ``` #### Problem description The above methods throw `AttributeError: 'Variable' object has no attribute '_constructor'` errors when called on Datasets. It's not clear if this operation is currently supported, but if it's not then it probably shouldn't be exposed through the API. #### Expected Output Dataset of boolean DataArrays indicating null-ness. #### Output of ``xr.show_versions()``
Show_versions() doesn't seem to exist in 0.9.6, but presumably this covers it: Numpy version: 1.13.1 Pandas version: 0.21.0 XArray version: 0.9.6
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1715/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue