html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1143#issuecomment-264133419,https://api.github.com/repos/pydata/xarray/issues/1143,264133419,MDEyOklzc3VlQ29tbWVudDI2NDEzMzQxOQ==,5629061,2016-12-01T10:15:21Z,2016-12-01T10:15:21Z,NONE,"The pandas docs do seem to say that conversion to timedelta64[D] (or other frequencies) is possible - see: http://pandas.pydata.org/pandas-docs/stable/timedeltas.html#frequency-conversion Also here's a more realistic example of why this is problematic for me - I have a sequence of dates and I want to calculate the difference between them in days: possible in pandas, but not possible in xarray without first reverting to pandas/numpy types ``` dates = pandas.Series([datetime.date(2016, 01, 10), datetime.date(2016, 01, 20), datetime.date(2016, 01, 25)]).astype('datetime64[ns]') dates.diff().astype('timedelta64[D]').astype(float) #returns #0 NaN #1 10.0 #2 5.0 #dtype: float6 xarray.DataArray(dates).diff(dim = 'dim_0').astype('timedelta64[D]').astype(float) #returns # #array([ 8.64000000e+14, 4.32000000e+14]) #Coordinates: # * dim_0 (dim_0) int64 1 2 ``` Again the xarray result is in ns rather than days. Thanks","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,192325490 https://github.com/pydata/xarray/issues/1143#issuecomment-263626446,https://api.github.com/repos/pydata/xarray/issues/1143,263626446,MDEyOklzc3VlQ29tbWVudDI2MzYyNjQ0Ng==,5629061,2016-11-29T16:47:25Z,2016-11-29T16:47:25Z,NONE,"The conversion to timedelta64[ns] is done on this line of code: https://github.com/pydata/xarray/blob/d66f673ab25fe0fc0483bd5d67479fc94a14e46d/xarray/core/variable.py#L169 Is there a reason behind the conversion, or could it be removed?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,192325490