Skip to content

Commit f684ed3

Browse files
committed
Avoid silent overflow for numpy compatibility
1 parent c90387e commit f684ed3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

harp/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def read(
9090
micros = np.ndarray(nrows, dtype=np.uint16, buffer=data, offset=payloadoffset, strides=stride)
9191
payloadoffset += 2
9292
time = micros * _SECONDS_PER_TICK + seconds
93-
payloadtype = payloadtype & ~0x10
93+
payloadtype = payloadtype & ~np.uint8(0x10)
9494
if epoch is not None:
9595
time = epoch + pd.to_timedelta(time, "s") # type: ignore
9696
index = pd.Series(time)

0 commit comments

Comments
 (0)