提交 3f03e996 authored 作者: David Warde-Farley's avatar David Warde-Farley

Fix the nameprefix in multi_dtype_tests to actually work.

上级 db14207b
...@@ -863,8 +863,8 @@ def rand_of_dtype(shape, dtype): ...@@ -863,8 +863,8 @@ def rand_of_dtype(shape, dtype):
def multi_dtype_tests(shape1, shape2, dtypes=ALL_DTYPES, nameprefix=''): def multi_dtype_tests(shape1, shape2, dtypes=ALL_DTYPES, nameprefix=''):
for dtype1, dtype2 in combinations(dtypes, 2): for dtype1, dtype2 in combinations(dtypes, 2):
name1 = '%s_%s' % (nameprefix, dtype1, dtype2) name1 = '%s_%s_%s' % (nameprefix, dtype1, dtype2)
name2 = '%s_%s' % (nameprefix, dtype2, dtype1) name2 = '%s_%s_%s' % (nameprefix, dtype2, dtype1)
obj1 = rand_of_dtype(shape1, dtype1) obj1 = rand_of_dtype(shape1, dtype1)
obj2 = rand_of_dtype(shape2, dtype2) obj2 = rand_of_dtype(shape2, dtype2)
yield (name, (obj1, obj2)) yield (name, (obj1, obj2))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论