I am using snap.py with Python 3.7.8. When I tried to create a tree with fanout 1 (i.e. a path) in the interactive shell, the session quit abruptly with no error message.
I looked at the C++ code and it seems this line is the culprit (/snap-core/ggen.h, line 134):
const int Nodes = (int) (pow(double(Fanout), double(Levels+1)) - 1) / (Fanout - 1);
So the number of nodes is calculated using the formula for geometric sums, and with fanout 1 you get a division by zero. I do not have any perfect suggestion for how to resolve this, but I think either the number of nodes should be calculated another way, or it should be specified in docs that fanout must be >=2.
I am using snap.py with Python 3.7.8. When I tried to create a tree with fanout 1 (i.e. a path) in the interactive shell, the session quit abruptly with no error message.
I looked at the C++ code and it seems this line is the culprit (/snap-core/ggen.h, line 134):
const int Nodes = (int) (pow(double(Fanout), double(Levels+1)) - 1) / (Fanout - 1);
So the number of nodes is calculated using the formula for geometric sums, and with fanout 1 you get a division by zero. I do not have any perfect suggestion for how to resolve this, but I think either the number of nodes should be calculated another way, or it should be specified in docs that fanout must be >=2.