Skip to content

Commit dd13194

Browse files
committed
Post rebase fixes
1 parent 68082f0 commit dd13194

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

lib/iris/coords.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,8 +2106,7 @@ def cell(self, index):
21062106
return Cell(point, bound)
21072107

21082108
def collapsed(self, dims_to_collapse: Optional[Dims] = None) -> "Coord":
2109-
"""
2110-
Returns a copy of this coordinate, which has been collapsed along the specified dimensions.
2109+
"""Return a copy of this coordinate, which has been collapsed along the specified dimensions.
21112110
21122111
Replaces the points & bounds with a simple bounded region.
21132112
"""
@@ -2133,9 +2132,7 @@ def serialize(
21332132
# array we can loop through.
21342133
work_array = np.moveaxis(x, axis, range(-len(axis), 0))
21352134
out_shape = work_array.shape[: -len(axis)]
2136-
work_array = work_array.reshape(
2137-
np.prod(out_shape, dtype=int), -1
2138-
)
2135+
work_array = work_array.reshape(np.prod(out_shape, dtype=int), -1)
21392136

21402137
joined = []
21412138
for arr_slice in work_array:

lib/iris/tests/unit/coords/test_Coord.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,7 @@ def test_string_nd_second(self):
581581

582582
def test_string_nd_bounds_first(self):
583583
self.setupTestArrays((3, 4))
584-
coord = AuxCoord(
585-
self.pts_real.astype(str), bounds=self.bds_real.astype(str)
586-
)
584+
coord = AuxCoord(self.pts_real.astype(str), bounds=self.bds_real.astype(str))
587585

588586
collapsed_coord = coord.collapsed(0)
589587

@@ -607,9 +605,7 @@ def test_string_nd_bounds_first(self):
607605

608606
def test_string_nd_bounds_second(self):
609607
self.setupTestArrays((3, 4))
610-
coord = AuxCoord(
611-
self.pts_real.astype(str), bounds=self.bds_real.astype(str)
612-
)
608+
coord = AuxCoord(self.pts_real.astype(str), bounds=self.bds_real.astype(str))
613609

614610
collapsed_coord = coord.collapsed(1)
615611

0 commit comments

Comments
 (0)