home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 944273383

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/5647#issuecomment-944273383 https://api.github.com/repos/pydata/xarray/issues/5647 944273383 IC_kwDOAMm_X844SHfn 4160723 2021-10-15T12:53:45Z 2021-10-15T12:57:38Z MEMBER

I've now re-implemented most of the alignment logic in #5692, using a dedicated class so that all intermediate steps are implemented in a clearer and more maintainable way.

One remaining task is to get the re-indexing logic right. Rather than relying on an Index.dim_indexers property, I feel that it'd be better to have two methods:

```python DimIntIndexers = Dict[Hashable, Any]

class Index: def reindex(self, dim_labels: Mapping[Hashable, Any]) -> DimIntIndexers: ...

def reindex_like(self, other: "Index") -> DimIntIndexers:
    ...

```

For alignment, I think we could directly call idx.reindex_like(other) for each index in each object to align where other corresponds to the aligned index that matches idx.

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