提交 7618e106 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make scipy happy across versions.

上级 b661e714
......@@ -67,6 +67,9 @@ def eval_outputs(outputs):
return compile.function([], outputs)()[0]
# scipy 0.17 will return sparse values in all cases while previous
# version sometimes wouldn't. This will make everything dense so that
# we can use assert_allclose.
def as_ndarray(val):
if hasattr(val, 'toarray'):
return val.toarray()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论