提交 5f16fe1f authored 作者: David Warde-Farley's avatar David Warde-Farley

Fix two more problems in multi_dtype_cast_tests. Obviously not thinking straight…

Fix two more problems in multi_dtype_cast_tests. Obviously not thinking straight today. Tests run now.
上级 65d83c5f
...@@ -875,8 +875,9 @@ def multi_dtype_cast_tests(shape, dtypes=ALL_DTYPES, nameprefix=''): ...@@ -875,8 +875,9 @@ def multi_dtype_cast_tests(shape, dtypes=ALL_DTYPES, nameprefix=''):
name1 = '%s_%s_%s' % (nameprefix, dtype1, dtype2) name1 = '%s_%s_%s' % (nameprefix, dtype1, dtype2)
name2 = '%s_%s_%s' % (nameprefix, dtype2, dtype1) name2 = '%s_%s_%s' % (nameprefix, dtype2, dtype1)
obj1 = rand_of_dtype(shape, dtype1) obj1 = rand_of_dtype(shape, dtype1)
yield (name, (obj1, dtype2)) obj2 = rand_of_dtype(shape, dtype2)
yield (name, (obj2, dtype1)) yield (name1, (obj1, dtype2))
yield (name2, (obj2, dtype1))
SecondBroadcastTester = makeTester( SecondBroadcastTester = makeTester(
name='SecondBroadcastTester', name='SecondBroadcastTester',
...@@ -917,7 +918,8 @@ CastTester = makeTester( ...@@ -917,7 +918,8 @@ CastTester = makeTester(
expected=lambda x, y: x.astype(y), expected=lambda x, y: x.astype(y),
good=dict(itertools.chain( good=dict(itertools.chain(
multi_dtype_cast_tests((2,)), multi_dtype_cast_tests((2,)),
[('%s_%s' % (dtype, dtype), rand_of_dtype((2,), dtype), dtype) [('%s_%s' % (dtype, dtype),
(rand_of_dtype((2,), dtype), dtype))
for dtype in ALL_DTYPES] for dtype in ALL_DTYPES]
)), )),
bad_build=dict( bad_build=dict(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论