We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 091d075 commit a9efb0dCopy full SHA for a9efb0d
wkcuber/downsampling.py
@@ -185,6 +185,8 @@ def downsample_cube_job(
185
186
with open_wkw(source_wkw_info) as source_wkw:
187
num_channels = source_wkw.header.num_channels
188
+ source_dtype = source_wkw.header.voxel_type
189
+ target_wkw_info.dtype = source_dtype
190
with open_wkw(
191
target_wkw_info,
192
pool_get_lock(),
@@ -195,7 +197,7 @@ def downsample_cube_job(
195
197
source_wkw.header.file_len * source_wkw.header.block_len
196
198
)
199
shape = (num_channels,) + (wkw_cubelength,) * 3
- file_buffer = np.zeros(shape, target_wkw.header.voxel_type)
200
+ file_buffer = np.zeros(shape, source_dtype)
201
tile_length = cube_edge_len
202
tile_count_per_dim = wkw_cubelength // tile_length
203
assert (
0 commit comments