home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 42789906

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-42789906 https://api.github.com/repos/pydata/xarray/issues/121 42789906 MDEyOklzc3VlQ29tbWVudDQyNzg5OTA2 1217238 2014-05-12T01:31:11Z 2014-05-12T01:31:11Z MEMBER

Yes, this is certainly related to #118. Virtual variables work by using pandas.DatetimeIndex methods, but if you're not using a standard calendar, you end up with an object array of netCDF4.datetime objects instead of an array of numpy.datetime64 objects (which can be turned into a DatetimeIndex).

Unfortunately, we do need to be able to make a DatetimeIndex to be able to use its (very quick) calculations for properties like year. The alternative is to write our own implementation, which would likely mean far slower pure-python code. We could also write a function to cast an array into a DatetimeIndex from datetime objects, which I'm guessing would be your preferred solution, even though there are issues like the difference between dates, as DatetimeIndex objects and numpy's datetime64 always assume a standard gregorian calendar.

{
    "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 2.724ms · About: xarray-datasette