Skip to content

Updated concat.py to add defaults for missing variables #2

Open
fumedev[bot] wants to merge 1 commit intotest2from
update_concat_over_defaults
Open

Updated concat.py to add defaults for missing variables #2
fumedev[bot] wants to merge 1 commit intotest2from
update_concat_over_defaults

Conversation

@fumedev
Copy link
Copy Markdown

@fumedev fumedev bot commented Mar 24, 2024

CHANGED

  • Updated the _calc_concat_over method in concat.py to now calculate which variables need to be concatenated and add any missing variables with np.nan values for datasets that do not contain them.

  • Added new test cases in test_concat.py to cover edge cases such as pre-existing vs non-pre-existing dimensions, different dimension sizes, missing variables, and extra dimensions. Ensured critical scenarios are covered for concatenation with the addition of defaults.

  • Updated whats-new.rst to include a new entry specifying the enhancement that xarray.concat now supports concatenating datasets with disjoint variables. The feature fills missing variables with np.nan by default, providing an example for user clarity.

…r missing variables in `xarray.concat`; added new tests and updated documentation"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants