Skip to content

Commit 0162bb8

Browse files
Apply ruff preview rule RUF046 (#687)
RUF046 Value being casted is already an integer
1 parent ee9a110 commit 0162bb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numcodecs/quantize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def encode(self, buf):
6565
precision = 10.0**-self.digits
6666
exp = math.log10(precision)
6767
if exp < 0:
68-
exp = int(math.floor(exp))
68+
exp = math.floor(exp)
6969
else:
70-
exp = int(math.ceil(exp))
70+
exp = math.ceil(exp)
7171
bits = math.ceil(math.log2(10.0**-exp))
7272
scale = 2.0**bits
7373
enc = np.around(scale * arr) / scale

0 commit comments

Comments
 (0)