Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4915,3 +4915,5 @@ v0.1 (2 May 2014)
-----------------

Initial release.
- Fixed bug where merge(combine_attrs='override') was not copying attrs but instead referencing attrs from the first object. (:issue:)
- Fixed bug where ``merge(combine_attrs='override')`` was not copying attrs but instead referencing attrs from the first object. (:issue:`4629`)
2 changes: 1 addition & 1 deletion xarray/core/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def merge_attrs(variable_attrs, combine_attrs):
if combine_attrs == "drop":
return {}
elif combine_attrs == "override":
return variable_attrs[0]
return dict(variable_attrs[0])
Comment on lines 503 to +504
elif combine_attrs == "no_conflicts":
result = dict(variable_attrs[0])
for attrs in variable_attrs[1:]:
Expand Down