home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 956829554

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/issues/5919#issuecomment-956829554 https://api.github.com/repos/pydata/xarray/issues/5919 956829554 IC_kwDOAMm_X845CA9y 10194086 2021-11-01T23:04:41Z 2021-11-01T23:04:58Z MEMBER

The test failures can be reproduced with: python import pandas as pd import numpy as np np.array(0) == pd.Period("2000", freq="B") This returns False in pandas 1.3.4 but raises TypeError: iteration over a 0-d array in pandas master. I think the culprit is https://github.com/pandas-dev/pandas/pull/44182 which added a code path for numpy arrays in Period.__richcmp__.

The failure happens in https://github.com/pydata/xarray/blob/3e442e760cc99a4b695eaaed27a286ce6e8fa6aa/xarray/tests/test_variable.py#L326

and we could fix it with

diff - assert v[0] == pd.Period("2000", freq="B") + assert v[0:1] == pd.Period("2000", freq="B")

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