mariomulansky / PySpike

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

Tutorial example fails with TypeError: data type not understood #35

Closed lesshaste closed 6 years ago

lesshaste commented 6 years ago

I tried to follow the simple example from the tutorial http://mariomulansky.github.io/PySpike/#tutorial . That is:

import numpy as np
from pyspike import SpikeTrain

spike_train = SpikeTrain(np.array([0.1, 0.3, 0.45, 0.6, 0.9], [0.0, 1.0]))

But this gives:


TypeError Traceback (most recent call last)

in () 2 from pyspike import SpikeTrain 3 ----> 4 spike_train = SpikeTrain(np.array([0.1, 0.3, 0.45, 0.6, 0.9], [0.0, 1.0])) TypeError: data type not understood
mariomulansky commented 6 years ago

Yes, this is a typo in the tutorial. I believe it should be: spike_train = SpikeTrain(np.array([0.1, 0.3, 0.45, 0.6, 0.9]), [0.0, 1.0]) I'll update the docs.