I've just noticed that FixedScaleOffset flattens arrays on encoding.
This is not stated in the documentation
This breaks further images encoding in the pipeline.
Minimal test to reproduce:
import numpy as np
from numcodecs import FixedScaleOffset
shape = (8, 4, 5)
x = (200.0 + np.arange(np.prod(shape), dtype=np.float32).reshape(shape) * 0.001)
fso = FixedScaleOffset(offset=200.0, scale=1000.0, dtype="<f4", astype="<u2")
# Expected (8, 4, 5)
# Actuel (160, )
print(fso.shape)
I've just noticed that FixedScaleOffset flattens arrays on encoding.
This is not stated in the documentation
This breaks further images encoding in the pipeline.
Minimal test to reproduce: