We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f33a2a commit 15b9374Copy full SHA for 15b9374
1 file changed
src/climatebenchpress/compressor/compressors/jpeg2000.py
@@ -36,10 +36,12 @@ def abs_bound_codec(
36
*,
37
data_min=None,
38
data_max=None,
39
+ dtype=None,
40
**kwargs,
41
):
42
assert data_min is not None, "data_min must be provided"
43
assert data_max is not None, "data_max must be provided"
44
+ assert dtype is not None, "dtype must be provided"
45
46
max_pixel_val = 2**25 - 1 # maximum pixel value for our integer encoding.
47
@@ -56,7 +58,7 @@ def abs_bound_codec(
56
58
# increase precision for better rounding during linear quantization
57
59
numcodecs.astype.AsType(
60
encode_dtype="float64",
- decode_dtype="float32",
61
+ decode_dtype=dtype.name,
62
),
63
# remap from [min, max] to [0, max_pixel_val]
64
numcodecs_wasm_fixed_offset_scale.FixedOffsetScale(
0 commit comments