提交 696f2fc6 authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Remove warning for old SciPy versions

上级 f5cd48f5
...@@ -4,13 +4,10 @@ from warnings import warn ...@@ -4,13 +4,10 @@ from warnings import warn
try: try:
import scipy import scipy
scipy_ver = [int(n) for n in scipy.__version__.split(".")[:2]] enable_sparse = True
enable_sparse = bool(scipy_ver >= [0, 7])
if not enable_sparse:
warn(f"SciPy version is {scipy.__version__}. We recommend a version >= 0.7.0")
except ImportError: except ImportError:
enable_sparse = False enable_sparse = False
warn("scipy can't be imported." " We disable the sparse matrix code.") warn("SciPy can't be imported. Sparse matrix support is disabled.")
from theano.sparse.type import * from theano.sparse.type import *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论