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 5502dc8 commit d718988Copy full SHA for d718988
numcodecs/quantize.py
@@ -65,9 +65,9 @@ def encode(self, buf):
65
precision = 10.0**-self.digits
66
exp = math.log10(precision)
67
if exp < 0:
68
- exp = int(math.floor(exp))
+ exp = math.floor(exp)
69
else:
70
- exp = int(math.ceil(exp))
+ exp = math.ceil(exp)
71
bits = math.ceil(math.log2(10.0**-exp))
72
scale = 2.0**bits
73
enc = np.around(scale * arr) / scale
0 commit comments