home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 261433336

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/1128#issuecomment-261433336 https://api.github.com/repos/pydata/xarray/issues/1128 261433336 MDEyOklzc3VlQ29tbWVudDI2MTQzMzMzNg== 1217238 2016-11-18T02:36:21Z 2016-11-18T02:36:21Z MEMBER

In the long run I think it would be more robust to check for attributes (duck type style) rather than types in the various places.

Indeed, in particular I'm not very happy with the isinstance check for indexing.MemoryCachedArray in Variable.copy() -- it's rather poor separation of concerns.

It exists so that variable.compute() does not cache data in-memory on variable but only on the computed variable. Otherwise, there's basically no point to the separate compute method: if you use cache=True, you are stuck with caching on the original object. Likewise, it ensures that .copy() creates an array with a new cache, which is consistent with the current behavior of .copy().

As for type checking for dask arrays in .data: yes, it would be nice to have a well defined array interface layer that other array types could plug into. That would entail a significant amount of further work, however.

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