home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 42793512

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/121#issuecomment-42793512 https://api.github.com/repos/pydata/xarray/issues/121 42793512 MDEyOklzc3VlQ29tbWVudDQyNzkzNTEy 2443309 2014-05-12T03:25:35Z 2014-05-12T03:25:35Z MEMBER

I think the simplest option would be to develop a function to cast the netCDF4.datetime objects into an array of numpy.datetime64 objects.

Does xray do a lot of timedelta operations? If not, I'd say its probably best to live with (for now) the discrepancies between the calendars. Just be sure that you always use the netCDF4.date2num when going back to ordinal times.

I've run into issues like this repeatedly and I think it would be really nice if the datetime module was calendar aware -- probably not going to happen. The closest thing I've found to this is the netCDF4 netcdftime.py which is written in pure python but could be expanded to handle the issues we're talking about.

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