浏览代码

Import sympy (if it exists) regardless of the setting of symbolic_byte_counters

So that symbolic_byte_counters could be set to True at runtime
Ian Goldberg 5 年之前
父节点
当前提交
6a3410a2f6
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      network.py

+ 3 - 1
network.py

@@ -12,8 +12,10 @@ from enum import Enum
 # You will need sympy installed for this to work.
 symbolic_byte_counters = False
 
-if symbolic_byte_counters:
+try:
     import sympy
+except:
+    pass
 
 # Network parameters