We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1e6da6 commit 392d56aCopy full SHA for 392d56a
datajoint/blob.py
@@ -268,7 +268,7 @@ def read_int(self):
268
269
@staticmethod
270
def pack_int(v):
271
- return b"\x0a" + v.to_bytes((v.bit_length() + 7 + (v < 0)) // 8, byteorder='little', signed=True)
+ return b"\x0a" + v.to_bytes(v.bit_length() // 8 + 1, byteorder='little', signed=True)
272
273
def read_bool(self):
274
return bool(self.read_value('bool'))
0 commit comments