home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1221528092

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/6906#issuecomment-1221528092 https://api.github.com/repos/pydata/xarray/issues/6906 1221528092 IC_kwDOAMm_X85Izwoc 6628425 2022-08-21T11:37:47Z 2022-08-21T11:37:47Z MEMBER

Apologies for taking a while to look into this. I have not been able to set up an environment to reproduce these test failures, which makes it tricky. It seems like the tests are failing in the setup step, where a DataArray of some random times is generated: data = xr.DataArray(np.random.randint(1, 1000000, size=(4, 5)).astype("<M8[h]"), dims=("x", "y")) In principle the NumPy code should not generate any times larger than 1,000,000 hours since 1970-01-01, i.e. 2084-01-29T16:00:00, which in theory should be should be representable with a nanosecond-precision pandas Timestamp.

Trying to narrow things down, I guess my first question would be: does the following fail in this environment? Is this maybe a pandas issue? ```

import numpy as np; import pandas as pd pd.Timestamp(np.int64(1000000).astype("<M8[h]")) Timestamp('2084-01-29 16:00:00') ``` I think these tests could be simplified some to remove the randomness, but that's probably a separate issue.

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