Skip to content

Conversation

@tianyilim
Copy link

timestamps_50khz is an array of np.uint64. In the (rare) case that the difference between the two values in the array is 0, cnt underflows.

This fix checks for this case.

@sudoRicheek
Copy link
Collaborator

sudoRicheek commented Nov 11, 2025

Hi @tianyilim. Nice catch! Thanks for the contribution.
However, this can't be merged as is, since I have updated the dataloader to support the millisecond to event index mapping, which is available for a lot of event datasets. This causes a minor conflict. Also, I have realized, we do not need the -1 there so you can directly check if cnt >= min_numevents_ctx (I will confirm this sometime).

If you want to modify the PR to make these changes, you are welcome to - and I will merge it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants