In neuron, Population.tset() fails to set a parameter in a population with an array of arrays. See the example below: Assigning random spike times to a Population of SpikeSourceArray?.
>>> st = numpy.random.random((10,10))
>>> stimpop = Population(10, SpikeSourceArray)
>>> stimpop.tset('spike_times', st)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/micha/mypython//lib64/python2.5/site-packages/pyNN/neuron/__init__.py", line 882, in tset
values = numpy.reshape(value_array, (self.dim, value_array.size/self.cell.size))
File "/usr/lib64/python2.5/site-packages/numpy/core/fromnumeric.py", line 116, in reshape
return reshape(newshape, order=order)
Find attached a patch. It fixes two things:
1. an invalid tuple passed to reshape (line 882)
2. a missing "axis" keyword in array.take, causing the array to be flattened (line 886)