In python, iteration with im.physical_nodes sometimes skips nodes and sometimes gives seg. fault. The underlying InfomapLeafIteratorPhysical works in C++ so problem seems to be in SWIG.
As InfomapIteratorPhysical works also in python, the current solution adds a python iterator wrapper around this that skips non-leaf nodes.
In python, iteration with
im.physical_nodes
sometimes skips nodes and sometimes gives seg. fault. The underlyingInfomapLeafIteratorPhysical
works in C++ so problem seems to be in SWIG.As
InfomapIteratorPhysical
works also in python, the current solution adds a python iterator wrapper around this that skips non-leaf nodes.