home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 253477840

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/1044#issuecomment-253477840 https://api.github.com/repos/pydata/xarray/issues/1044 253477840 MDEyOklzc3VlQ29tbWVudDI1MzQ3Nzg0MA== 4160723 2016-10-13T10:37:24Z 2016-10-14T13:07:41Z MEMBER

After seeing the discussion in #680, I'm wondering if showing the firsts values of the flattened array wouldn't be enough here, e.g., something like this:

```

d <xarray.DataArray (a: 2, b: 5, c: 2, d: 10)> array int64 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... Coordinates: * a (a) <U1 'A' 'B' * b (b) <U5 'Cat 1' 'Cat 2' 'Cat 3' 'Cat 4' 'Cat 5' * c (c) <U1 'J' 'K' * d (d) int64 0 1 2 3 4 5 6 7 8 9 ```

This example is more consistent with the repr of Dataset data variables, and similarly we could customize the repr of dask arrays and lazy arrays (loaded from netcdf files) like this:

```

d.chunk((10, 5, 5, 10)) <xarray.DataArray (a: 2, b: 5, c: 2, d: 10)> dask.array int64 chunksize=(10, 5, 5, 10) Coordinates: * a (a) <U1 'A' 'B' * b (b) <U5 'Cat 1' 'Cat 2' 'Cat 3' 'Cat 4' 'Cat 5' * c (c) <U1 'J' 'K' * d (d) int64 0 1 2 3 4 5 6 7 8 9 ```

```

d.name = 'myvar' d.to_netcdf('data.nc') xr.open_dataset('data.nc').myvar <xarray.DataArray 'myvar' (a: 2, b: 5, c: 2, d: 10)> lazy-array int64 Coordinates: * a (a) <U1 'A' 'B' * b (b) <U5 'Cat 1' 'Cat 2' 'Cat 3' 'Cat 4' 'Cat 5' * c (c) <U1 'J' 'K' * d (d) int64 0 1 2 3 4 5 6 7 8 9 ```

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