home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 269086156

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/1162#issuecomment-269086156 https://api.github.com/repos/pydata/xarray/issues/1162 269086156 MDEyOklzc3VlQ29tbWVudDI2OTA4NjE1Ng== 1217238 2016-12-24T14:20:23Z 2016-12-24T14:20:23Z MEMBER

I believe Dataset.transpose already skips variables that don't need to be transposed. On Sat, Dec 24, 2016 at 5:40 AM mangecoeur notifications@github.com wrote:

@mangecoeur commented on this pull request.

In xarray/core/dataset.py https://github.com/pydata/xarray/pull/1162:

  • coord_dim = var.dims[0] # should just be one?
  • selection = take(var, indexers_dict[coord_dim]) +
  • sel_coords[c] = (dim, selection)
  • else:
  • sel_coords[c] = self.coords[c] +
  • variables = OrderedDict() +
  • for name in data_vars:
  • var = self.variables[name]
  • Transpose the var to ensure that the indexed dims come first

  • These dims will be collapsed in the output.

  • To avoid edge cases in numpy want to transpose to ensure the indexed dimensions are first

  • However transpose is not lazy, so want to avoid using it for dask case (??)

  • var = var.transpose(*(list(d for d in indexer_dims if d in var.dims) +

I did that originally but then I thought that if there are variables that are not indexed at all we can skip applying transpose to them this way (and triggering a data load on them too). Does that make sense?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/1162, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKS1j6axEaUtX-1kH3n_fmLy4o5ErRiks5rLRLHgaJpZM4LLMXX .

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