We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I thought we might have had an issue (and maybe solved it?) but couldn't find it anywhere. Forgive me if I'm duplicating.
xr.DataArray(np.random.rand(100,5,1)) <xarray.DataArray (dim_0: 100, dim_1: 5, dim_2: 1)> array([[[0.71333665], [0.93820892], [0.48678056], [0.07299961], [0.63542414]], *** Deleted 400 lines *** [[0.29987457], [0.55963998], [0.25976744], [0.80062955], [0.503025 ]], [[0.48255097], [0.55861315], [0.36059861], [0.96539665], [0.05674621]], [[0.81389941], [0.55745028], [0.20348983], [0.63390148], [0.94698865]], [[0.16792246], [0.9252646 ], [0.38596734], [0.17168077], [0.18162088]], [[0.04526339], [0.70028912], [0.72388995], [0.97481276], [0.66155381]], [[0.15058745], [0.57646963], [0.53382085], [0.24696459], [0.77601528]], [[0.6752243 ], [0.84991466], [0.87758404], [0.70828751], [0.04033709]]]) Dimensions without coordinates: dim_0, dim_1, dim_2
With larger arrays, it's much more reasonable:
<xarray.DataArray (dim_0: 500, dim_1: 6, dim_2: 1)> array([[[0.9680447 ], [0.12554914], [0.9163406 ], [0.63710986], [0.97778361], [0.6419909 ]], [[0.48480678], [0.31214637], [0.72270997], [0.81523543], [0.34327902], [0.80941523]], [[0.92192284], [0.47841933], [0.00760903], [0.83886152], [0.88538772], [0.6532889 ]], ..., [[0.39558324], [0.42220218], [0.56731915], [0.27388751], [0.51097741], [0.62824705]], [[0.97379019], [0.0311196 ], [0.09790975], [0.65206508], [0.14369363], [0.09683937]], [[0.71318171], [0.88591664], [0.30032286], [0.97324135], [0.10250702], [0.03973667]]]) Dimensions without coordinates: dim_0, dim_1, dim_2
Something like 40 lines is probably a reasonable place to truncate?
xr.show_versions()
xarray: 0.15.0 pandas: 0.25.3 numpy: 1.17.3 scipy: 1.3.2 netCDF4: 1.5.3 pydap: None h5netcdf: 0.7.4 h5py: 2.10.0 Nio: None zarr: None cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.2.1 dask: 2.7.0 distributed: 2.7.0 matplotlib: 3.1.2 cartopy: None seaborn: 0.9.0 numbagg: None setuptools: 41.6.0.post20191101 pip: 19.3.1 conda: None pytest: 5.2.2 IPython: 7.9.0 sphinx: 2.2.1
The text was updated successfully, but these errors were encountered:
Hmm, that does look pretty bad. We do have some existing heuristics for shortening up NumPy’s repr but perhaps they could use some tweaking: https://github.com/pydata/xarray/blob/master/xarray/core/formatting.py#L416
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
MCVE Code Sample
I thought we might have had an issue (and maybe solved it?) but couldn't find it anywhere. Forgive me if I'm duplicating.
Expected Output
With larger arrays, it's much more reasonable:
Problem Description
Something like 40 lines is probably a reasonable place to truncate?
Output of
xr.show_versions()
xarray: 0.15.0
pandas: 0.25.3
numpy: 1.17.3
scipy: 1.3.2
netCDF4: 1.5.3
pydap: None
h5netcdf: 0.7.4
h5py: 2.10.0
Nio: None
zarr: None
cftime: 1.0.4.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.2.1
dask: 2.7.0
distributed: 2.7.0
matplotlib: 3.1.2
cartopy: None
seaborn: 0.9.0
numbagg: None
setuptools: 41.6.0.post20191101
pip: 19.3.1
conda: None
pytest: 5.2.2
IPython: 7.9.0
sphinx: 2.2.1
The text was updated successfully, but these errors were encountered: