home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 42985094

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/126#issuecomment-42985094 https://api.github.com/repos/pydata/xarray/issues/126 42985094 MDEyOklzc3VlQ29tbWVudDQyOTg1MDk0 1217238 2014-05-13T17:22:17Z 2014-05-13T17:22:17Z MEMBER

The issue with the 360_day calendar is sort of what I was afraid of with the non-standard calendars. I think issuing warnings is a reasonable solution, but perhaps it would be better to not even try to convert dates with calendars that can't be safely converted? That would be slightly more predictable (I would still probably issue a warning in those cases). Looking at the standard NetCDF calendars it appears that the only problematic ones would be "all_leap"/"366_day" and "uniform30day"/"360_day".

It would also be nice if you could also issue a warning when we fall back to netCDF4 datetime objects because there are dates outside the valid range. The DecodedCFDatetimeArray object pretends to have dtype=np.datetime64, and in this case the values turn out not to be.

In terms of tests: 1. Please also verify that converting a single element returns what you expect. This should be a np.datetime64 object, not a 0-dimensional datetime64 array, since numpy's support for these is semi-broken. 2. Please use a context manager to verify that the warning you expect is issued. This also keeps expected warnings from polluting our test output. See: https://docs.python.org/2/library/warnings.html#testing-warnings

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