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
>>> import numpy as np >>> import xarray as xr >>> da = xr.DataArray(np.zeros((2,3)), coords=[('unknown', [1, 2]), ('unknown', [0, 90, 180])]) >>> da <xarray.DataArray (unknown: 3)> array([[0., 0., 0.], [0., 0., 0.]]) Coordinates: * unknown (unknown) int64 0 90 180 >>> da.dims ('unknown', 'unknown') >>> da.coords Coordinates: * unknown (unknown) int64 0 90 180 >>> da.sel(unknown=90) ValueError: conflicting sizes for dimension 'unknown': length 2 on <this-array> and length 3 on 'unknown'
The DaraArray constructor creates an invalid DataArray given duplicate coordinate names.
The DaraArray constructor should raise an Exception given duplicate coordinates names.
xr.show_versions()
xarray: 0.10.4 pandas: 0.23.0 numpy: 1.14.3 scipy: 1.1.0 netCDF4: 1.3.1 h5netcdf: 0.5.1 h5py: 2.8.0 Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.17.5 distributed: 1.21.8 matplotlib: 2.2.2 cartopy: 0.16.0 seaborn: None setuptools: 39.1.0 pip: 10.0.1 conda: None pytest: 3.5.1 IPython: None sphinx: None
The text was updated successfully, but these errors were encountered:
Thanks for raising an issue. It looks similar to #1499.
Agreed. Do you mind to send a fix for this?
Sorry, something went wrong.
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically
stale
Successfully merging a pull request may close this issue.
Code Sample
Problem description
The DaraArray constructor creates an invalid DataArray given duplicate coordinate names.
Expected Output
The DaraArray constructor should raise an Exception given duplicate coordinates names.
Output of
xr.show_versions()
xarray: 0.10.4
pandas: 0.23.0
numpy: 1.14.3
scipy: 1.1.0
netCDF4: 1.3.1
h5netcdf: 0.5.1
h5py: 2.8.0
Nio: None
zarr: None
bottleneck: 1.2.1
cyordereddict: None
dask: 0.17.5
distributed: 1.21.8
matplotlib: 2.2.2
cartopy: 0.16.0
seaborn: None
setuptools: 39.1.0
pip: 10.0.1
conda: None
pytest: 3.5.1
IPython: None
sphinx: None
The text was updated successfully, but these errors were encountered: