zarr-developers / zarr_implementations

MIT License
38 stars 16 forks source link

Review signedness of jzarr #45

Open joshmoore opened 3 years ago

joshmoore commented 3 years ago

Looking at one of these failures (reading js.zr/blosc/lz4/ with Zarr) the first few values differ:

Yeah, the values seen there are what would be obtained when trying to convert uint8 values to int8 so that values >=128 overflow and become negative.

For example

import numpy as np
np.asarray([154, 147, 151, 109], dtype=np.int8)

gives

array([-102, -109, -105,  109], dtype=int8)

_Originally posted by @grlee77 in https://github.com/zarr-developers/zarr_implementations/issues/37#issuecomment-832215509_