Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions harp/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def read(
raise ValueError(f"expected address {address} but got {data[2]}")

index = None
stride = data[1] + 2
stride = int(data[1] + 2)
nrows = len(data) // stride
payloadtype = data[4]
payloadoffset = 5
Expand All @@ -90,7 +90,7 @@ def read(
micros = np.ndarray(nrows, dtype=np.uint16, buffer=data, offset=payloadoffset, strides=stride)
payloadoffset += 2
time = micros * _SECONDS_PER_TICK + seconds
payloadtype = payloadtype & ~0x10
payloadtype = payloadtype & ~np.uint8(0x10)
if epoch is not None:
time = epoch + pd.to_timedelta(time, "s") # type: ignore
index = pd.Series(time)
Expand Down