home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 593874263

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/3820#issuecomment-593874263 https://api.github.com/repos/pydata/xarray/issues/3820 593874263 MDEyOklzc3VlQ29tbWVudDU5Mzg3NDI2Mw== 8833517 2020-03-03T10:20:08Z 2020-03-03T10:20:08Z CONTRIBUTOR

I think that inferring dimension-names from the coords-dict is the most intuitive way to define a DataArray.

Passing a dictionary for coords is in my opinion the clearest way to indicate which coordinates belong to which dimension, so then why do I have to specify the same dimension names again?

An example of how I create them from my current project: values = xr.DataArray( values, coords={'n_high': n_highs, 'n_low': n_lows, 'rep': repetitions, 'model': models, 'idx': range(n_test_samples),}, dims=['n_high', 'n_low', 'rep', 'model', 'idx'], <-- repeated dim names attrs=attributes, )

If you expect almost everyone to use CPython or 3.7+ anyway, then I don't actually see any drawbacks, while it would regularly make code shorter and less repetitive.

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