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
Control attrs of result in merge(), concat(), combine_by_coords() and combine_nested() (#3877)
* Optionally promote attrs from DataArray to Dataset in to_dataset
Adds option 'promote_attrs' to DataArray.to_dataset(). By default
promote_attrs=False, maintaining current behaviour. If
promote_attrs=True, the attrs of the DataArray are shallow-copied to the
Dataset returned by to_dataset().
* utils.ordered_dict_union returns the union of two compatible dicts
If the values of any shared key are not equivalent, then raises an
error.
* combine_attrs argument for merge()
Provides several options for how to combine the attributes of the passed
objects and give them to the returned Dataset.
* combine_attrs argument for concat()
Provides several options for how to combine the attributes of the passed
objects and give them to the returned DataArray or Dataset.
* combine_attrs argument for combine_by_coords() and combine_nested()
Provides several options for how to combine the attributes of the passed
objects and give them to the returned Dataset.
* Add combine_attrs changes to whats-new.rst
* Update docstrings to note default values
Apply suggestions from code review
Co-Authored-By: Maximilian Roos <[email protected]>
* First argument of update_safety_check and ordered_dict_union not mutable
No need for these arguments to be MutableMapping rather than just
Mapping.
* Rename ordered_dict_union -> compat_dict_union
Do not use OrderedDicts any more, so name did not make sense.
* Move combine_attrs to v0.16.0 in whats-new.rst
* Fix merge of whats-new.rst
Co-authored-by: Maximilian Roos <[email protected]>
0 commit comments