提交 4ea6c9e8 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added a new test (currently failing due to changeset 6b9ef114aee0)

上级 bfa0b74c
...@@ -1814,6 +1814,14 @@ def test_reshape(): ...@@ -1814,6 +1814,14 @@ def test_reshape():
utt.verify_grad(just_vals, [a_val]) utt.verify_grad(just_vals, [a_val])
def test_make_column_matrix_broadcastable():
# The goal of the operation made by `b` is to ensure the second dimension
# of the column matrix is broadcastable.
a = dmatrix()
b = a.reshape((a.shape[0], )).dimshuffle(0, 'x')
f = function([a], b)
assert (f(numpy.zeros((3, 1))) + numpy.ones(2) == numpy.ones((3, 2))).all()
def test_flatten_outdimNone(): def test_flatten_outdimNone():
""" Flatten always returns a copy of the array. There is no danger with in-place """ Flatten always returns a copy of the array. There is no danger with in-place
operations and thus no need to test it.""" operations and thus no need to test it."""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论