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.
BitRound
1 parent 85eb7aa commit cabecaeCopy full SHA for cabecae
numcodecs/bitround.py
@@ -59,7 +59,8 @@ def encode(self, buf):
59
return a
60
if self.keepbits > bits:
61
raise ValueError("Keepbits too large for given dtype")
62
- b = a.view(a_int_dtype)
+ b = a.copy()
63
+ b = b.view(a_int_dtype)
64
maskbits = bits - self.keepbits
65
mask = (all_set >> maskbits) << maskbits
66
half_quantum1 = (1 << (maskbits - 1)) - 1
0 commit comments