Commit 8e23884
committed
STYLE: Avoid warning with divide by zero
A warning was displayed when the length of an iterable was zero.
"Avoid RuntimeWarning: divide by zero encountered in log10"
Avoid this warning by explicitly checking for zero and giving
alternate behavior when no nodes are presented.1 parent 34c7092 commit 8e23884
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
754 | 761 | | |
755 | 762 | | |
756 | 763 | | |
| |||
0 commit comments