File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -2106,8 +2106,7 @@ def cell(self, index):
2106
2106
return Cell (point , bound )
2107
2107
2108
2108
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.
2111
2110
2112
2111
Replaces the points & bounds with a simple bounded region.
2113
2112
"""
@@ -2133,9 +2132,7 @@ def serialize(
2133
2132
# array we can loop through.
2134
2133
work_array = np .moveaxis (x , axis , range (- len (axis ), 0 ))
2135
2134
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 )
2139
2136
2140
2137
joined = []
2141
2138
for arr_slice in work_array :
Original file line number Diff line number Diff line change @@ -581,9 +581,7 @@ def test_string_nd_second(self):
581
581
582
582
def test_string_nd_bounds_first (self ):
583
583
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 ))
587
585
588
586
collapsed_coord = coord .collapsed (0 )
589
587
@@ -607,9 +605,7 @@ def test_string_nd_bounds_first(self):
607
605
608
606
def test_string_nd_bounds_second (self ):
609
607
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 ))
613
609
614
610
collapsed_coord = coord .collapsed (1 )
615
611
You can’t perform that action at this time.
0 commit comments