提交 2eb4481e authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Add another test, and comment that some shapes will not work.

上级 9afa4a08
...@@ -815,7 +815,9 @@ def test_setitem_rightvalue_ndarray_fails(): ...@@ -815,7 +815,9 @@ def test_setitem_rightvalue_ndarray_fails():
def test_zeros_basic(): def test_zeros_basic():
# 3d # 3d
for shp in [(3,4,5), (300,), ()]: for shp in [(3,4,5), (300,), (), (0,7)]:
## TODO these shape do not work:
# (3,0), (4,1,5)
_a = cuda_ndarray.CudaNdarray.zeros(shp) _a = cuda_ndarray.CudaNdarray.zeros(shp)
_n = numpy.zeros(shp, dtype="float32") _n = numpy.zeros(shp, dtype="float32")
assert numpy.allclose(numpy.asarray(_a), _n) assert numpy.allclose(numpy.asarray(_a), _n)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论