-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Check for just ... in stack etc, and raise with a useful error message #6051
New issue
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
Comments
It still needs to be in a list! Otherwise it would be funky to do In [2]: import xarray as xr
...:
...: da = xr.DataArray([[1,2],[1,2]], dims=("x", "y"))
...: da.stack(flat=[...]) |
Can we special-case |
I see @mathause agrees, so I am v happy to be voted into the minority, but I would vote against it — I would def be up for updating the error message to check for this mistake. (I worry that when people disagree we can stay with the status quo, so I really would be fine doing this if you think it's better. Also I didn't get the release done yesterday so I should be downweighted 😁 ) |
Sounds good to me. I also agree with checking for |
Is your feature request related to a problem? Please describe.
The following doesn't work
Describe the solution you'd like
This could be equivalent to
I think using
ds.dims
it should be fine for datasets too.The text was updated successfully, but these errors were encountered: