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
[proposal] concatenate by axis, ignore dimension names #3281
Comments
Thanks for the suggestion! Generally we try to keep all of xarray's functions "metadata aware", rather overriding metadata. So the API feels a little out of place to me. Maybe you could share a little bit more about your use case for this? |
Thanks for your answer @shoyer. For example, lets consider a dataset with:
Now I want to stick those side-by-side to get an array |
@Hoeze is it possible to use features_i = ("features_1", "features_2", ..., "features_n")
x_combined = original.stack(features=features_i) |
@TomNicholas No, not really. Stack can be only used to combine multiple coordinates into one coordinate, e.g. In this case, we do not have shared data with coordinates to combine. The most similar methods to this one are |
Hi, I wrote a helper function which allows to concatenate arrays like
xr.combine_nested
with the difference that it only supportsxr.DataArrays
, concatenates them by axis position similar tonp.concatenate
and overwrites all dimension names.I often need this to combine very different feature types.
Would it make sense to include this in xarray?
The text was updated successfully, but these errors were encountered: