Relative Content

Tag Archive for pythonarrayspython-3.xboolean

Aligning Sparse Boolean Arrays

I have two (very) long and sparse boolean arrays n1 and n2, representing spikes of two neurons that are responding to the same stimulus. Because they are responding to the same stimulus, they have many “overlapping” spikes (up to some t time-difference); but also because of biological noise they could have uncoupled spikes (tonic properties of each neuron).
I’m looking for a way to map between spikes from n1 and n2, such that: