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/pull/2485#issuecomment-429903217,https://api.github.com/repos/pydata/xarray/issues/2485,429903217,MDEyOklzc3VlQ29tbWVudDQyOTkwMzIxNw==,1217238,2018-10-15T15:34:40Z,2018-10-15T15:34:40Z,MEMBER,"Just add a brief comment here summarizing this, e.g., ""# no longer used as
of pandas 0.23""
On Mon, Oct 15, 2018 at 5:36 AM Spencer Clark
wrote:
> *@spencerkclark* commented on this pull request.
> ------------------------------
>
> In xarray/coding/cftimeindex.py
> :
>
> > return CFTimeIndex(other + np.array(self))
>
> def __sub__(self, other):
> - return CFTimeIndex(np.array(self) - other)
> + if isinstance(other, CFTimeIndex):
> + return pd.TimedeltaIndex(np.array(self) - np.array(other))
> + elif isinstance(other, pd.TimedeltaIndex):
> + return CFTimeIndex(np.array(self) - other.to_pytimedelta())
> + else:
> + return CFTimeIndex(np.array(self) - other)
> +
> + def _add_delta(self, deltas):
> + # To support TimedeltaIndex + CFTimeIndex with older pandas versions
>
> Yes, this method is not needed with recent versions of pandas. I think the
> change that eliminated the need for it was in this PR:
> pandas-dev/pandas#19895 ,
> which I guess would have made it into pandas version 0.23.0.
>
> I added it because of the failing test in the Windows 32-bit Python 2.7
> build that used pandas version 0.22.0. Should I just mark the test as an
> expected failure for versions of pandas less than 0.23 and remove this
> private method?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> , or mute
> the thread
>
> .
>
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,369803291
https://github.com/pydata/xarray/pull/2485#issuecomment-429542820,https://api.github.com/repos/pydata/xarray/issues/2485,429542820,MDEyOklzc3VlQ29tbWVudDQyOTU0MjgyMA==,24736507,2018-10-13T13:41:20Z,2018-10-13T13:41:20Z,NONE,"Hello @spencerkclark! Thanks for submitting the PR.
- There are no PEP8 issues in the file [`xarray/coding/cftimeindex.py`](https://github.com/spencerkclark/xarray/blob/9c9f3dd68a495550108cbfa8cf65bc3fc3ac8955/xarray/coding/cftimeindex.py) !
- There are no PEP8 issues in the file [`xarray/tests/test_cftimeindex.py`](https://github.com/spencerkclark/xarray/blob/9c9f3dd68a495550108cbfa8cf65bc3fc3ac8955/xarray/tests/test_cftimeindex.py) !
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,369803291