I would like to know if there is any plan (or if it is possible) to make the hoc Object pickable, using cPickle.
This would give the possibilities to save a very complex model (vectors, sections and so on) and to reuse the model to reinvestigate the results or even continue the simulation.
consider this code:
Code: Select all
import cPickle
from neuron import h
sec = h.Section()
FILE = open("test", 'w')
cPickle.dump(sec, FILE,1)
FILE.close()
Code: Select all
/usr/lib/python2.6/copy_reg.pyc in _reduce_ex(self, proto)
68 else:
69 if base is self.__class__:
---> 70 raise TypeError, "can't pickle %s objects" % base.__name__
71 state = base(self)
72 args = (self.__class__, base, state)
TypeError: can't pickle Section objects
I'm using NEURON 7.0