Skip to content

Commit b2d4439

Browse files
authored
Merge pull request #755 from davidhassell/aggregate-transpose
Fix bug in `cf.aggregate` that sometimes put a null transpose operation into the Dask grpah when one was not needed
2 parents 7827ba4 + e0a1da5 commit b2d4439

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ version NEXT
2424
* Fix bug in `cf.read` when reading UM files that caused LBPROC value
2525
131072 (Mean over an ensemble of parallel runs) to be ignored
2626
(https://github.com/NCAS-CMS/cf-python/issues/737)
27+
* Fix bug in `cf.aggregate` that sometimes put a null transpose
28+
operation into the Dask grpah when one was not needed
29+
(https://github.com/NCAS-CMS/cf-python/issues/754)
2730

2831
----
2932

cf/aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4817,7 +4817,7 @@ def _aggregate_2_fields(
48174817

48184818
# Ensure that the axis orders are the same in both fields
48194819
transpose_axes1 = [dim0_name_map[axis0] for axis0 in data_axes0]
4820-
if transpose_axes1 != data_axes1:
4820+
if transpose_axes1 != list(data_axes1):
48214821
parent1.transpose(transpose_axes1, inplace=True)
48224822

48234823
construct_type = parent0.construct_type

0 commit comments

Comments
 (0)