home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 429903217

This data as json

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 notifications@github.com wrote:

@spencerkclark commented on this pull request.

In xarray/coding/cftimeindex.py https://github.com/pydata/xarray/pull/2485#discussion_r225145820:

     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 https://github.com/pandas-dev/pandas/pull/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 https://github.com/pydata/xarray/pull/2485#discussion_r225145820, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKS1iKDRM5Cgp8ODnM18-bYY1rqidWmks5ulH9dgaJpZM4Xaojb .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  369803291
Powered by Datasette · Queries took 0.692ms · About: xarray-datasette