mariomulansky / PySpike

Python implementation of spike distance metrics
http://mariomulansky.github.io/PySpike
Other
71 stars 30 forks source link

Fix incorrect integrals in PieceWiseConstFunc #36

Closed jonathanjouty closed 6 years ago

jonathanjouty commented 6 years ago

Supersedes #34. Fixes #33.

I think all that is needed is to handle the special case where start_index > end_index, which happens when the given interval is between values.

Right, I managed to figure out how this time.

I would prefer to raise ValueError("Invalid averaging interval: interval[0]>=interval[1]") here instead of an assert.

Done. I also took the liberty of adding some more!

Could you please create a PR against develop instead of master?

Done.

jonathanjouty commented 6 years ago

Looks like the failing tests are on develop and not being introduced by this PR.

mariomulansky commented 6 years ago

Thanks jonathan. Yes the build failures in develop are my fault and they are fixed now. I'll merge this also.