f = read_neuroml2_file("./ISN_net.net.nml.h5", optimized=True)
net = f.networks[0]
for p in net.populations:
for i in p.instances:
print(i)
....
<transientPoissonFiringSynapse id="tpfsPertInh_after" averageRate="3600 Hz" delay="1500.0ms" duration="500.0ms" synapse="ampaBkg" spikeTarget="./ampaBkg"/>
</neuroml>
Traceback (most recent call last):
File "/home/asinha/Documents/02_Code/00_mine/models/MultiscaleISN/NeuroML2/test.py", line 19, in <module>
for i in p.instances:
File "/home/asinha/.local/share/virtualenvs/neuroml-311-dev/lib/python3.11/site-packages/neuroml/hdf5/NetworkContainer.py", line 57, in __next__
instance = self.__getitem__(self.cursor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/asinha/.local/share/virtualenvs/neuroml-311-dev/lib/python3.11/site-packages/neuroml/hdf5/NetworkContainer.py", line 96, in __getitem__
z=self.array[index][self._get_index_or_add("z", 3)],
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: index 3 is out of bounds for axis 0 with size 3
Something to do with the old vs new HDF5 export API? We should document this change somewhere so users know when to use optimized and when not.
gives:
Something to do with the old vs new HDF5 export API? We should document this change somewhere so users know when to use optimized and when not.