home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 42951350

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/125#issuecomment-42951350 https://api.github.com/repos/pydata/xarray/issues/125 42951350 MDEyOklzc3VlQ29tbWVudDQyOTUxMzUw 514053 2014-05-13T13:02:22Z 2014-05-13T13:02:22Z CONTRIBUTOR

Yeah this gets tricky. Fixed part of the problem by reverting to using np.asarray instead of as_array_or_item in NumpyArrayWrapper. But I'm not sure thats the full solution, like you mentioned the problem is much deeper, though I don't think pushing the datetime nastiness into higher level functions (such as concat) is a great option.

Also, I've been hoping to get the way dates are handled to be slightly more consistent, since as it currently stands its hard to know which data type dates are being stored as.

```

d64 = np.datetime64(d) print xray.Variable(['time'], [d]).dtype dtype('O') print xray.Variable(['time'], [d64]).dtype dtype('<M8[ns]') print d64.dtype dtype('<M8[us]') ```

I'm going to attempt getting utils.as_safe_array to convert from datetime objects to datetime64 objects which should make things a little clearer, but still doesn't solve the whole problem.

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