浏览代码

skip starpu_py_parallel.sh when numpy is not available

Samuel Thibault 4 年之前
父节点
当前提交
04717acc13
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      starpupy/examples/starpu_py_parallel.py

+ 4 - 1
starpupy/examples/starpu_py_parallel.py

@@ -20,7 +20,10 @@ import time
 import asyncio
 from math import sqrt
 from math import log10
-import numpy as np
+try:
+    import numpy as np
+except:
+    exit(77)
 import sys
 
 #generate a list to store functions