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 326344778,MDU6SXNzdWUzMjYzNDQ3Nzg=,2183,converting int vars to floats when I where the enclosing ds?,1778852,open,0,,,5,2018-05-25T00:48:43Z,2022-04-09T02:14:23Z,,NONE,,,,"#### Code Sample ```python test_ds = xr.Dataset() test_ds['var1'] = xr.DataArray(np.arange(5)) test_ds['var2'] = xr.DataArray(np.ones(5)) assert(test_ds['var1'].dtype == np.int64) assert(test_ds.where(test_ds['var2'] == 1)['var1'].dtype == np.int64) ``` #### Problem description Second assert fails, which is a bit strange I think. Is that intended? If so, whats the reasoning? #### Output of ``xr.show_versions()``
commit: None python: 2.7.14.final.0 python-bits: 64 OS: Linux OS-release: 4.9.87-linuxkit-aufs machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: None LOCALE: None.None xarray: 0.10.3 pandas: 0.22.0 numpy: 1.14.3 scipy: 1.1.0 netCDF4: None h5netcdf: None h5py: None Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: None distributed: None matplotlib: 2.2.2 cartopy: None seaborn: 0.8.1 setuptools: 39.1.0 pip: 10.0.1 conda: None pytest: 3.5.1 IPython: 5.6.0 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2183/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 484699415,MDU6SXNzdWU0ODQ2OTk0MTU=,3256,.item() on a DataArray with dtype='datetime64[ns]' returns int,1778852,open,0,,,4,2019-08-23T20:29:50Z,2022-04-09T02:03:43Z,,NONE,,,,"#### MCVE Code Sample ```python import datetime import xarray as xr test_da = xr.DataArray(datetime.datetime(2019, 1, 1, 1, 1)) test_da # # array('2019-01-01T01:01:00.000000000', dtype='datetime64[ns]') test_da.item() # 1546304460000000000 ``` #### Expected Output I would think it would be nice to get a `datetime` out of the `.item()` call then the nanosecond representation. #### Output of ``xr.show_versions()``
When I call xr.show_versions() i get an error but im running xarray 0.12.3
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3256/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue