提交 6612697e authored 作者: Yaroslav Bulatov's avatar Yaroslav Bulatov 提交者: Frederic

Fix crash when numpy.distutils.__config__ is present but None

上级 52ea2d0c
...@@ -161,7 +161,8 @@ _logger = logging.getLogger('theano.tensor.blas') ...@@ -161,7 +161,8 @@ _logger = logging.getLogger('theano.tensor.blas')
# Otherwise, we give an optimization warning for no reason in some cases. # Otherwise, we give an optimization warning for no reason in some cases.
def default_blas_ldflags(): def default_blas_ldflags():
try: try:
if hasattr(numpy.distutils, '__config__'): if (hasattr(numpy.distutils, '__config__') and
numpy.distutils.__config__):
#If the old private interface is available use it as it #If the old private interface is available use it as it
#don't print information to the user. #don't print information to the user.
blas_info = numpy.distutils.__config__.blas_opt_info blas_info = numpy.distutils.__config__.blas_opt_info
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论