Skip to content

Commit 5e78b5f

Browse files
committed
remove in place ops from bitround encode
1 parent 85eb7aa commit 5e78b5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numcodecs/bitround.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def encode(self, buf):
6363
maskbits = bits - self.keepbits
6464
mask = (all_set >> maskbits) << maskbits
6565
half_quantum1 = (1 << (maskbits - 1)) - 1
66-
b += ((b >> maskbits) & 1) + half_quantum1
67-
b &= mask
66+
b = b + ((b >> maskbits) & 1) + half_quantum1
67+
b = b & mask
6868
return b
6969

7070
def decode(self, buf, out=None):

0 commit comments

Comments
 (0)