My guess is that `events` here is a list of lists. Eventually it needs to be an `ndarray` of `float` type -- do you convert it to that later? It would be good to add tests on the real (final) `events` array in the TODO below. For example, if you know when things *actually* happened in the paradigm, you should be able to manually construct the events list (`ndarray`) you expect to get from your algorithm, and verify you get the proper output. Make sense?