Code: Select all
myvec = [x._ref_concentration for x in mySpecies.nodes]
Is there a way to know what are the addresses the pointers are pointing to? I'm ultimately trying to find what's causing my seg fault and this could help.
Code: Select all
myvec = [x._ref_concentration for x in mySpecies.nodes]
Code: Select all
$ cat temp.py
from neuron import h
slist = [h.Section(name="s%d"%i) for i in range(5)]
for s in slist:
s.nseg = 3
s.insert("hh")
slist[2](.5).hh.gnabar = 0.2
ref = slist[2](.5).hh._ref_gnabar
assert ref[0] == 0.2
print(ref)
Code: Select all
$ python3 -i temp.py
data_handle<double>{cont=hh gnabar row=7/15 val=0.2}
Code: Select all
>>> slist[0] = None
>>> ref
data_handle<double>{cont=hh gnabar row=7/12 val=0.2}
Code: Select all
>>> xref = NT.nodes(h.spine[0])(0.5)[0]._ref_concentration
>>> xref
data_handle<double>{raw=0x559b6797d040}