Commit e059cc7
authored
Fix generator exhaustion in
* Fix generator exhaustion in combine_by_coords
`combine_by_coords` accepts `Iterable[Dataset | DataArray]`.
When a generator is passed, it is exhausted by the `DataTree` isinstance
check before `objs_are_unnamed_dataarrays` is assigned, causing subsequent
iterations to yield nothing and returning an empty Dataset.
Fix by materializing `data_objects` into a list.
* Add entry in whats-new.rstcombine_by_coords (#11265)1 parent d0ee979 commit e059cc7
2 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | 1081 | | |
| |||
0 commit comments