Consider the following Python function, looping over all sections of a morphology, creating membrane current recorders for all segments;
Code: Select all
def set_imem_recorders(self, tstopms):
'''record membrane currents for all compartments'''
self.memireclist = neuron.h.List()
for sec in neuron.h.allseclist:
for seg in sec:
memirec = neuron.h.Vector(size=int(tstopms/self.timeres_python+1))
memirec.record(seg._ref_i_membrane, self.timeres_python)
self.memireclist.append(memirec)
I found that using the following fix work, but it cant be so that the size argument should not be honored?
Code: Select all
....
memirec = neuron.h.Vector()
memirec.resize(int(tstopms/self.timeres_python+1))
....