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 301856320,MDExOlB1bGxSZXF1ZXN0MTcyNTY4Njcx,1953,Fix maybe_promote,1997005,closed,0,,,3,2018-03-02T18:11:49Z,2018-08-20T16:35:50Z,2018-08-20T16:31:16Z,CONTRIBUTOR,,0,pydata/xarray/pulls/1953,"With tests for every possible dtype: (numpy docs say `biufcmMOSUV` only) ```python for letter in string.ascii_letters: try: print(letter, np.dtype(letter)) except TypeError as exc: pass ``` - [x] Closes #1952 - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1953/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 301795163,MDU6SXNzdWUzMDE3OTUxNjM=,1952,xarray.merge exception : invalid type promotion,1997005,closed,0,,,4,2018-03-02T15:02:43Z,2018-08-20T16:31:16Z,2018-08-20T16:31:16Z,CONTRIBUTOR,,,,"#### Code Sample ```python import xarray import pandas import numpy array1 = xarray.DataArray( [numpy.timedelta64('NaT')], dims=['time'], coords={'time': pandas.to_datetime(['2018-01-01'])}, name='foo' ) array2 = xarray.DataArray( [numpy.timedelta64(30, 's')], dims=['time'], coords={'time': pandas.to_datetime(['2018-01-02'])}, name='foo' ) xarray.merge([array1, array2]) ``` #### Problem description Merging arrays with identical dtypes should work ... There's some issue with the `NaT` being interpreted as float64, so that `xarray.core.dtypes.result_type` thinks that those 2 arrays are not compatible.. It works with `xarray==0.10.0` and fails at `xarray==0.10.1`. I've pin-pointed the issue to commit 2aa5b8a5c0945935. Work-around in the mean time : ```python xarray.merge([array1.astype(float), array2.astype(float)]).astype('timedelta64') ``` #### Expected Output ```python # expected : xarray.DataArray( [numpy.timedelta64('NaT'), numpy.timedelta64(30, 's')], dims=['time'], coords={'time': pandas.to_datetime(['2018-01-01', '2018-01-02'])}, name='foo' ) ``` #### Output of ``xr.show_versions()``
INSTALLED VERSIONS ------------------ commit: None python: 3.6.2.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-142-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: fr_FR.UTF-8 LOCALE: fr_FR.UTF-8 xarray: 0.10.0+dev60.g2aa5b8a pandas: 0.22.0 numpy: 1.14.0 scipy: None netCDF4: 1.3.1 h5netcdf: None h5py: None Nio: None zarr: None bottleneck: None cyordereddict: None dask: None distributed: None matplotlib: 2.1.1 cartopy: None seaborn: None setuptools: 38.4.0 pip: 9.0.1 conda: None pytest: 3.3.2 IPython: 6.2.1 sphinx: None
Thanks !","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1952/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 220241754,MDU6SXNzdWUyMjAyNDE3NTQ=,1359,Bug: open_dataarray does not pass properly its parameters to open_dataset,1997005,closed,0,,2444330,1,2017-04-07T15:06:50Z,2017-04-12T22:28:35Z,2017-04-12T22:28:35Z,CONTRIBUTOR,,,,"Hi, There's now a `autoclose` parameter to the `open_dataset` function. But `open_dataarray` uses positional arguments only, so now the arguments are no longer at their place, and `engine`, for instance, can't be specified. Thanks !","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1359/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue