提交 96931fd1 authored 作者: Frederic's avatar Frederic

Support python object in the comparison.

This is needed in the Scan tests.
上级 ea6f1e7e
......@@ -474,6 +474,8 @@ else:
def _allclose(a, b, rtol=None, atol=None):
a = numpy.asarray(a)
b = numpy.asarray(b)
narrow = 'float32', 'complex64'
if (str(a.dtype) in narrow) or (str(b.dtype) in narrow):
atol_ = float32_atol
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论