home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 375663610

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
375663610 MDU6SXNzdWUzNzU2NjM2MTA= 2528 display_width doesn't apply to dask-backed arrays 1197350 closed 0     3 2018-10-30T19:49:05Z 2020-09-30T06:17:17Z 2020-09-30T06:17:17Z MEMBER      

The representation of dask-backed arrays in xarray's __repr__ methods results in very long lines which often overflow the desired line width. Unfortunately, this can't be controlled or overridden with xr.set_options(display_width=...).

Code Sample, a copy-pastable example if possible

python import xarray as xr xr.set_options(display_width=20) ds = (xr.DataArray(range(100)) .chunk({'dim_0': 10}) .to_dataset(name='really_long_long_name')) ds

<xarray.Dataset> Dimensions: (dim_0: 100) Dimensions without coordinates: dim_0 Data variables: really_long_long_name (dim_0) int64 dask.array<shape=(100,), chunksize=(10,)>

Problem description

[this should explain why the current behavior is a problem and why the expected output is a better solution.]

Expected Output

We need to decide how to abbreviate dask arrays with something more concise. I'm not sure the best way to do this. Maybe really_long_long_name (dim_0) int64 dask chunks=(10,)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2528/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.555ms · About: xarray-datasette