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/3673#issuecomment-579865854,https://api.github.com/repos/pydata/xarray/issues/3673,579865854,MDEyOklzc3VlQ29tbWVudDU3OTg2NTg1NA==,2448579,2020-01-29T17:21:14Z,2020-01-29T17:21:14Z,MEMBER,all green! (https://github.com/pydata/xarray/runs/415513689) Thanks Tom,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-579740185,https://api.github.com/repos/pydata/xarray/issues/3673,579740185,MDEyOklzc3VlQ29tbWVudDU3OTc0MDE4NQ==,6628425,2020-01-29T12:47:04Z,2020-01-29T12:47:04Z,MEMBER,Thanks for the fixes @TomAugspurger!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-579517151,https://api.github.com/repos/pydata/xarray/issues/3673,579517151,MDEyOklzc3VlQ29tbWVudDU3OTUxNzE1MQ==,1312546,2020-01-28T23:12:47Z,2020-01-28T23:12:47Z,MEMBER,"FYI, we had some failures in our nightly wheel builds so they weren't updated in a while. https://github.com/MacPython/pandas-wheels/pull/70 fixed that, so you'll hopefully get a new wheel tonight. On Tue, Jan 28, 2020 at 5:09 PM Deepak Cherian wrote: > should be closed by pandas-dev/pandas#31136 > . I think the tests > will turn green once the wheels update > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-579515338,https://api.github.com/repos/pydata/xarray/issues/3673,579515338,MDEyOklzc3VlQ29tbWVudDU3OTUxNTMzOA==,2448579,2020-01-28T23:09:11Z,2020-01-28T23:09:11Z,MEMBER,should be closed by https://github.com/pandas-dev/pandas/pull/31136 . I think the tests will turn green once the wheels update,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-575692321,https://api.github.com/repos/pydata/xarray/issues/3673,575692321,MDEyOklzc3VlQ29tbWVudDU3NTY5MjMyMQ==,2448579,2020-01-17T16:16:40Z,2020-01-17T16:16:40Z,MEMBER,Thanks @TomAugspurger ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-575688251,https://api.github.com/repos/pydata/xarray/issues/3673,575688251,MDEyOklzc3VlQ29tbWVudDU3NTY4ODI1MQ==,1312546,2020-01-17T16:06:23Z,2020-01-17T16:06:23Z,MEMBER,Opened https://github.com/pandas-dev/pandas/issues/31109.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-575681325,https://api.github.com/repos/pydata/xarray/issues/3673,575681325,MDEyOklzc3VlQ29tbWVudDU3NTY4MTMyNQ==,2448579,2020-01-17T15:51:07Z,2020-01-17T15:51:07Z,MEMBER,Thanks @jbrockmendel should we open a pandas issue?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-574271673,https://api.github.com/repos/pydata/xarray/issues/3673,574271673,MDEyOklzc3VlQ29tbWVudDU3NDI3MTY3Mw==,8078968,2020-01-14T16:56:34Z,2020-01-14T16:56:34Z,NONE,we recently changed datetimelike arithmetic to send all object-dtype arrays through _addsub_object_array (previously _addsub_offsetlike). Previously I think `idx.__add__(a)` would return NotImplemented. So we probably want to get the NotImplemented behavior back.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-574256856,https://api.github.com/repos/pydata/xarray/issues/3673,574256856,MDEyOklzc3VlQ29tbWVudDU3NDI1Njg1Ng==,1312546,2020-01-14T16:25:50Z,2020-01-14T16:25:50Z,MEMBER,"@jbrockmendel likely knows more about the index arithmetic issue. ```python In [22]: import xarray as xr In [23]: import pandas as pd In [24]: idx = pd.timedelta_range(""1D"", periods=5, freq=""D"") In [25]: a = xr.cftime_range(""2000"", periods=5) In [26]: idx + a /Users/taugspurger/sandbox/pandas/pandas/core/arrays/datetimelike.py:1204: PerformanceWarning: Adding/subtracting array of DateOffsets to TimedeltaArray not vectorized PerformanceWarning, Out[26]: Index([2000-01-02 00:00:00, 2000-01-04 00:00:00, 2000-01-06 00:00:00, 2000-01-08 00:00:00, 2000-01-10 00:00:00], dtype='object') In [27]: a + idx Out[27]: CFTimeIndex([2000-01-02 00:00:00, 2000-01-04 00:00:00, 2000-01-06 00:00:00, 2000-01-08 00:00:00, 2000-01-10 00:00:00], dtype='object') ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-574251696,https://api.github.com/repos/pydata/xarray/issues/3673,574251696,MDEyOklzc3VlQ29tbWVudDU3NDI1MTY5Ng==,2448579,2020-01-14T16:15:09Z,2020-01-14T16:15:09Z,MEMBER,"> (1) is trickier; I'm not sure if it's something we should raise in the pandas issue tracker. Essentially we rely on TimedeltaIndex.__add__(other) to return NotImplemented when other is a CFTimeIndex; this way it will resort to using CFTimeIndex.__radd__ instead. It looks like recent code changes in pandas broke this. cc @TomAugspurger ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915 https://github.com/pydata/xarray/issues/3673#issuecomment-573416265,https://api.github.com/repos/pydata/xarray/issues/3673,573416265,MDEyOklzc3VlQ29tbWVudDU3MzQxNjI2NQ==,6628425,2020-01-12T13:38:26Z,2020-01-12T13:38:26Z,MEMBER,"So there are two classes of failures here: 1. With pandas master, adding a CFTimeIndex to a TimedeltaIndex no longer returns a CFTimeIndex; instead it returns a generic Index of cftime objects.
Failure

``` 2020-01-07T19:19:39.0297443Z =================================== FAILURES =================================== 2020-01-07T19:19:39.0495451Z _________________ test_timedeltaindex_add_cftimeindex[365_day] _________________ 2020-01-07T19:19:39.0496702Z 2020-01-07T19:19:39.0498391Z calendar = '365_day' 2020-01-07T19:19:39.0499052Z 2020-01-07T19:19:39.0500036Z @requires_cftime 2020-01-07T19:19:39.0500669Z @pytest.mark.parametrize(""calendar"", _CFTIME_CALENDARS) 2020-01-07T19:19:39.0501986Z def test_timedeltaindex_add_cftimeindex(calendar): 2020-01-07T19:19:39.0502556Z a = xr.cftime_range(""2000"", periods=5, calendar=calendar) 2020-01-07T19:19:39.0503384Z deltas = pd.TimedeltaIndex([timedelta(days=2) for _ in range(5)]) 2020-01-07T19:19:39.0503635Z result = deltas + a 2020-01-07T19:19:39.0504330Z expected = a.shift(2, ""D"") 2020-01-07T19:19:39.0505283Z assert result.equals(expected) 2020-01-07T19:19:39.0506265Z > assert isinstance(result, CFTimeIndex) 2020-01-07T19:19:39.0507151Z E AssertionError: assert False 2020-01-07T19:19:39.0508329Z E + where False = isinstance(Index([2000-01-03 00:00:00, 2000-01-04 00:00:00, 2000-01-05 00:00:00,\n 2000-01-06 00:00:00, 2000-01-07 00:00:00],\n dtype='object'), CFTimeIndex) ```

2. With pandas master, casting a DatetimeIndex (i.e. the result of a call to `to_datetime`) to an array now returns a NumPy array of timezone-aware `Timestamp` objects, rather than timezone-naive NumPy array of dtype `datetime64[ns]`.
Failure

``` 2020-01-07T19:19:39.0552973Z ____ test_cf_datetime_nan[num_dates1-days since 2000-01-01-expected_list1] _____ 2020-01-07T19:19:39.0553281Z 2020-01-07T19:19:39.0553765Z num_dates = [nan, 0], units = 'days since 2000-01-01' 2020-01-07T19:19:39.0554887Z expected_list = ['NaT', '2000-01-01T00:00:00Z'] 2020-01-07T19:19:39.0555104Z 2020-01-07T19:19:39.0555251Z @arm_xfail 2020-01-07T19:19:39.0555406Z @requires_cftime 2020-01-07T19:19:39.0555551Z @pytest.mark.parametrize( 2020-01-07T19:19:39.0555693Z [""num_dates"", ""units"", ""expected_list""], 2020-01-07T19:19:39.0555849Z [ 2020-01-07T19:19:39.0556225Z ([np.nan], ""days since 2000-01-01"", [""NaT""]), 2020-01-07T19:19:39.0556674Z ([np.nan, 0], ""days since 2000-01-01"", [""NaT"", ""2000-01-01T00:00:00Z""]), 2020-01-07T19:19:39.0556881Z ( 2020-01-07T19:19:39.0557026Z [np.nan, 0, 1], 2020-01-07T19:19:39.0557374Z ""days since 2000-01-01"", 2020-01-07T19:19:39.0558208Z [""NaT"", ""2000-01-01T00:00:00Z"", ""2000-01-02T00:00:00Z""], 2020-01-07T19:19:39.0558355Z ), 2020-01-07T19:19:39.0558466Z ], 2020-01-07T19:19:39.0558591Z ) 2020-01-07T19:19:39.0559984Z def test_cf_datetime_nan(num_dates, units, expected_list): 2020-01-07T19:19:39.0560153Z with warnings.catch_warnings(): 2020-01-07T19:19:39.0560559Z warnings.filterwarnings(""ignore"", ""All-NaN"") 2020-01-07T19:19:39.0560733Z actual = coding.times.decode_cf_datetime(num_dates, units) 2020-01-07T19:19:39.0561076Z # use pandas because numpy will deprecate timezone-aware conversions 2020-01-07T19:19:39.0561235Z expected = pd.to_datetime(expected_list) 2020-01-07T19:19:39.0561532Z > assert_array_equal(expected, actual) 2020-01-07T19:19:39.0561669Z E AssertionError: 2020-01-07T19:19:39.0561785Z E Arrays are not equal 2020-01-07T19:19:39.0561899Z E 2020-01-07T19:19:39.0562138Z E Mismatched elements: 2 / 2 (100%) 2020-01-07T19:19:39.0562505Z E x: array([NaT, Timestamp('2000-01-01 00:00:00+0000', tz='UTC')], dtype=object) 2020-01-07T19:19:39.0563375Z E y: array([ 'NaT', '2000-01-01T00:00:00.000000000'], 2020-01-07T19:19:39.0563710Z E dtype='datetime64[ns]') 2020-01-07T19:19:39.0564285Z 2020-01-07T19:19:39.0564914Z xarray/tests/test_coding_times.py:455: AssertionError ```

(2) is simple. Basically due to a planned change1 in pandas, the test needs to be edited. In xarray we still expect `decode_cf_datetime` to return timezone-naive dates. Therefore we need to make sure that we are comparing against a timezone-naive reference. (1) is trickier; I'm not sure if it's something we should raise in the pandas issue tracker. Essentially we rely on `TimedeltaIndex.__add__(other)` to return `NotImplemented` when `other` is a `CFTimeIndex`; this way it will resort to using `CFTimeIndex.__radd__` instead. It looks like recent code changes in pandas broke this. ------ 1See this FutureWarning: ``` FutureWarning: Converting timezone-aware DatetimeArray to timezone-naive ndarray with 'datetime64[ns]' dtype. In the future, this will return an ndarray with 'object' dtype where each element is a 'pandas.Timestamp' with the correct 'tz'. To accept the future behavior, pass 'dtype=object'. To keep the old behavior, pass 'dtype=""datetime64[ns]""'. exec(code_obj, self.user_global_ns, self.user_ns) ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,547012915