Skip to content

Commit

Permalink
Copy in BitRound (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
slevang authored Oct 17, 2024
1 parent 85eb7aa commit cabecae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numcodecs/bitround.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def encode(self, buf):
return a
if self.keepbits > bits:
raise ValueError("Keepbits too large for given dtype")
b = a.view(a_int_dtype)
b = a.copy()
b = b.view(a_int_dtype)
maskbits = bits - self.keepbits
mask = (all_set >> maskbits) << maskbits
half_quantum1 = (1 << (maskbits - 1)) - 1
Expand Down

0 comments on commit cabecae

Please sign in to comment.