提交 180febf4 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Add tests for the cases where Alloc.c_code is used.

上级 8bdce1ea
...@@ -1209,6 +1209,8 @@ AllocTester = makeBroadcastTester( ...@@ -1209,6 +1209,8 @@ AllocTester = makeBroadcastTester(
op = alloc, op = alloc,
expected = (lambda x, *shp: numpy.zeros(shp, dtype=x.dtype) + x), expected = (lambda x, *shp: numpy.zeros(shp, dtype=x.dtype) + x),
good = dict( good = dict(
correct01 = (rand(), numpy.int32(7)),
correct01_bcast = (rand(1), numpy.int32(7)),
correct02 = (rand(), numpy.int32(4), numpy.int32(7)), correct02 = (rand(), numpy.int32(4), numpy.int32(7)),
correct12 = (rand(7), numpy.int32(4), numpy.int32(7)), correct12 = (rand(7), numpy.int32(4), numpy.int32(7)),
correct13 = (rand(7), numpy.int32(2), numpy.int32(4), numpy.int32(7)), correct13 = (rand(7), numpy.int32(2), numpy.int32(4), numpy.int32(7)),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论