提交 4c7b5d1f authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Merge pull request #146 from nouiz/fix_version_check

Correctly do version comparison: fix #136
from pkg_resources import parse_version as V
import numpy
import theano
......@@ -6,7 +8,7 @@ from theano.tensor.basic import _allclose
try:
import scipy
if scipy.__version__ < '0.7':
if V(scipy.__version__) < V('0.7'):
raise ImportError()
use_scipy = True
except ImportError:
......
from pkg_resources import parse_version as V
import sys
try:
import scipy
enable_sparse = scipy.__version__ >= '0.7'
enable_sparse = V(scipy.__version__) >= V('0.7')
if not enable_sparse:
sys.stderr.write("WARNING: scipy version = %s."
" We request version >=0.7.0 for the sparse code as it has"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论