Created
March 31, 2017 15:08
-
-
Save fredrike/0f6862737e27c69d3fa61fe1d5f8c59d to your computer and use it in GitHub Desktop.
graph_tool bugg, can't use vertex_average on an empty graph.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
........................................................................... | |
/home/fer/miniconda3/lib/python3.5/site-packages/graph_tool/stats/__init__.py in vertex_average(g=<GraphView object, undirected, with 0 vertices a...Graph 0x7f5f5a9be400, at 0x7f5f5a9bef28>, False)>, deg='total') | |
241 try: | |
242 a = array(a.a) | |
243 aa = array(aa.a) | |
244 except AttributeError: | |
245 pass | |
--> 246 a /= count | |
a = 0.0 | |
count = 0 | |
247 aa = sqrt((aa / count - a ** 2) / count) | |
248 return a, aa | |
249 | |
250 | |
ZeroDivisionError: float division by zero | |
___________________________________________________________________________ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment