inincs / pyNCS

pyNCS is a python library that allows easy access to Neuromorphic Chips and Systems (NCS),
http://inincs.github.com/pyNCS/
GNU General Public License v2.0
16 stars 10 forks source link

spiketrains_poisson, AttributeError: 'module' object has no attribute 'choice' #25

Closed eneftci closed 9 years ago

eneftci commented 10 years ago

on branch: no_syn_ad.

np.random.choice() is new in version 1.7.0, prior versions are still used on many machines, so a backward compatibility would be nice.

/home/emre/ISNL/lib/python2.7/site-packages/pyNCS/group.pyc in spiketrains_poisson(self, rate, t_start, duration, channel) 562 spiketimes = STCreate.poisson_generator(rate=sum(rate), 563 t_start=t_start, t_stop=t_start + duration).spike_times --> 564 assignments = np.random.choice(self.laddr, len(spiketimes), 565 p=1.*rate/sum(rate)) 566 stStim = SpikeList(np.column_stack((assignments, spiketimes)),

AttributeError: 'module' object has no attribute 'choice'