@@ -153,9 +153,9 @@ class Product(Spec[Axis]):
153
153
def axes (self ) -> list [Axis ]: # noqa: D102
154
154
return self .outer .axes () + self .inner .axes ()
155
155
156
- def calculate (
156
+ def calculate ( # noqa: D102
157
157
self , bounds : bool = True , nested : bool = False
158
- ) -> list [Frames [Axis ]]: # noqa: D102
158
+ ) -> list [Frames [Axis ]]:
159
159
frames_outer = self .outer .calculate (bounds = False , nested = nested )
160
160
frames_inner = self .inner .calculate (bounds , nested = True )
161
161
return frames_outer + frames_inner
@@ -194,9 +194,9 @@ class Repeat(Spec[Axis]):
194
194
def axes (self ) -> list [Axis ]: # noqa: D102
195
195
return []
196
196
197
- def calculate (
197
+ def calculate ( # noqa: D102
198
198
self , bounds : bool = True , nested : bool = False
199
- ) -> list [Frames [Axis ]]: # noqa: D102
199
+ ) -> list [Frames [Axis ]]:
200
200
return [Frames ({}, gap = np .full (self .num , self .gap ))]
201
201
202
202
@@ -233,9 +233,9 @@ class Zip(Spec[Axis]):
233
233
def axes (self ) -> list [Axis ]: # noqa: D102
234
234
return self .left .axes () + self .right .axes ()
235
235
236
- def calculate (
236
+ def calculate ( # noqa: D102
237
237
self , bounds : bool = True , nested : bool = False
238
- ) -> list [Frames [Axis ]]: # noqa: D102
238
+ ) -> list [Frames [Axis ]]:
239
239
frames_left = self .left .calculate (bounds , nested )
240
240
frames_right = self .right .calculate (bounds , nested )
241
241
assert len (frames_left ) >= len (
@@ -303,9 +303,9 @@ class Mask(Spec[Axis]):
303
303
def axes (self ) -> list [Axis ]: # noqa: D102
304
304
return self .spec .axes ()
305
305
306
- def calculate (
306
+ def calculate ( # noqa: D102
307
307
self , bounds : bool = True , nested : bool = False
308
- ) -> list [Frames [Axis ]]: # noqa: D102
308
+ ) -> list [Frames [Axis ]]:
309
309
frames = self .spec .calculate (bounds , nested )
310
310
for axis_set in self .region .axis_sets ():
311
311
# Find the start and end index of any dimensions containing these axes
@@ -363,9 +363,9 @@ class Snake(Spec[Axis]):
363
363
def axes (self ) -> list [Axis ]: # noqa: D102
364
364
return self .spec .axes ()
365
365
366
- def calculate (
366
+ def calculate ( # noqa: D102
367
367
self , bounds : bool = True , nested : bool = False
368
- ) -> list [Frames [Axis ]]: # noqa: D102
368
+ ) -> list [Frames [Axis ]]:
369
369
return [
370
370
SnakedFrames .from_frames (segment )
371
371
for segment in self .spec .calculate (bounds , nested )
@@ -408,9 +408,9 @@ def axes(self) -> list[Axis]: # noqa: D102
408
408
assert set (left_axes ) == set (right_axes ), f"axes { left_axes } != { right_axes } "
409
409
return left_axes
410
410
411
- def calculate (
411
+ def calculate ( # noqa: D102
412
412
self , bounds : bool = True , nested : bool = False
413
- ) -> list [Frames [Axis ]]: # noqa: D102
413
+ ) -> list [Frames [Axis ]]:
414
414
dim_left = squash_frames (
415
415
self .left .calculate (bounds , nested ), nested and self .check_path_changes
416
416
)
@@ -445,9 +445,9 @@ class Squash(Spec[Axis]):
445
445
def axes (self ) -> list [Axis ]: # noqa: D102
446
446
return self .spec .axes ()
447
447
448
- def calculate (
448
+ def calculate ( # noqa: D102
449
449
self , bounds : bool = True , nested : bool = False
450
- ) -> list [Frames [Axis ]]: # noqa: D102
450
+ ) -> list [Frames [Axis ]]:
451
451
dims = self .spec .calculate (bounds , nested )
452
452
dim = squash_frames (dims , nested and self .check_path_changes )
453
453
return [dim ]
@@ -513,9 +513,9 @@ def _line_from_indexes(
513
513
first = self .start - step / 2
514
514
return {self .axis : indexes * step + first }
515
515
516
- def calculate (
516
+ def calculate ( # noqa: D102
517
517
self , bounds : bool = True , nested : bool = False
518
- ) -> list [Frames [Axis ]]: # noqa: D102
518
+ ) -> list [Frames [Axis ]]:
519
519
return _dimensions_from_indexes (
520
520
self ._line_from_indexes , self .axes (), self .num , bounds
521
521
)
@@ -594,9 +594,9 @@ def _repeats_from_indexes(
594
594
) -> dict [Axis , npt .NDArray [np .float64 ]]:
595
595
return {self .axis : np .full (len (indexes ), self .value )}
596
596
597
- def calculate (
597
+ def calculate ( # noqa: D102
598
598
self , bounds : bool = True , nested : bool = False
599
- ) -> list [Frames [Axis ]]: # noqa: D102
599
+ ) -> list [Frames [Axis ]]:
600
600
return _dimensions_from_indexes (
601
601
self ._repeats_from_indexes , self .axes (), self .num , bounds
602
602
)
@@ -655,9 +655,9 @@ def _spiral_from_indexes(
655
655
self .x_axis : self .x_start + x_scale * phi * np .sin (phi + self .rotate ),
656
656
}
657
657
658
- def calculate (
658
+ def calculate ( # noqa: D102
659
659
self , bounds : bool = True , nested : bool = False
660
- ) -> list [Frames [Axis ]]: # noqa: D102
660
+ ) -> list [Frames [Axis ]]:
661
661
return _dimensions_from_indexes (
662
662
self ._spiral_from_indexes , self .axes (), self .num , bounds
663
663
)
0 commit comments