|
1 | 1 | import logging |
| 2 | +from typing import Tuple |
| 3 | + |
2 | 4 | import numpy as np |
3 | 5 | from wkcuber.downsampling import ( |
4 | 6 | InterpolationModes, |
|
20 | 22 | target_info = WkwDatasetInfo("testoutput/WT1_wkw", "color", 2, wkw.Header(np.uint8)) |
21 | 23 |
|
22 | 24 |
|
23 | | -def read_wkw(wkw_info, offset, size): |
| 25 | +def read_wkw( |
| 26 | + wkw_info: WkwDatasetInfo, offset: Tuple[int, int, int], size: Tuple[int, int, int] |
| 27 | +): |
24 | 28 | with open_wkw(wkw_info) as wkw_dataset: |
25 | 29 | return wkw_dataset.read(offset, size) |
26 | 30 |
|
@@ -120,7 +124,7 @@ def downsample_test_helper(use_compress): |
120 | 124 |
|
121 | 125 | assert np.all( |
122 | 126 | target_buffer |
123 | | - == downsample_cube(source_buffer, (2, 2, 2), InterpolationModes.MAX) |
| 127 | + == downsample_cube(source_buffer, [2, 2, 2], InterpolationModes.MAX) |
124 | 128 | ) |
125 | 129 |
|
126 | 130 |
|
@@ -180,7 +184,7 @@ def test_downsample_multi_channel(): |
180 | 184 | for channel_index in range(num_channels): |
181 | 185 | channels.append( |
182 | 186 | downsample_cube( |
183 | | - source_data[channel_index], (2, 2, 2), InterpolationModes.MAX |
| 187 | + source_data[channel_index], [2, 2, 2], InterpolationModes.MAX |
184 | 188 | ) |
185 | 189 | ) |
186 | 190 | joined_buffer = np.stack(channels) |
|
0 commit comments