You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides squeeze, a number of other methods like drop fail on DataArray b. Since, scalar dimensions are not dropped, it is almost impossible to do anything useful like plot, concat, etc with b. All these methods fail with ValueError: dimension 't' already exists as a scalar variable.
Expected Output
In my opinion, b and c should behave in the same way. It would just involve converting the scalar dimensions into lists. Is this behavior a bug or by design?
Output of xr.show_versions()
0.9.6
The text was updated successfully, but these errors were encountered:
This should actually raise an error at construction time for the DataArray. Variables with names matching dimensions are special in xarray: they are required to be 1D arrays with length matching the dimension size.
Code Sample, a copy-pastable example if possible
Problem description
Besides
squeeze
, a number of other methods likedrop
fail onDataArray b
. Since, scalar dimensions are not dropped, it is almost impossible to do anything useful likeplot
,concat
, etc withb
. All these methods fail withValueError: dimension 't' already exists as a scalar variable
.Expected Output
In my opinion,
b
andc
should behave in the same way. It would just involve converting the scalar dimensions into lists. Is this behavior a bug or by design?Output of
xr.show_versions()
0.9.6
The text was updated successfully, but these errors were encountered: