提交 98c9d9f2 authored 作者: David Warde-Farley's avatar David Warde-Farley

Add some rationale for tests.

上级 96cdab64
...@@ -50,11 +50,14 @@ def test_cholesky(): ...@@ -50,11 +50,14 @@ def test_cholesky():
pd = numpy.dot(r,r.T) pd = numpy.dot(r,r.T)
x = tensor.matrix() x = tensor.matrix()
chol = cholesky(x) chol = cholesky(x)
# Check the default.
ch_f = function([x], chol) ch_f = function([x], chol)
yield check_lower_triangular, pd, ch_f yield check_lower_triangular, pd, ch_f
# Explicit lower-triangular.
chol = Cholesky(lower=True)(x) chol = Cholesky(lower=True)(x)
ch_f = function([x], chol) ch_f = function([x], chol)
yield check_lower_triangular, pd, ch_f yield check_lower_triangular, pd, ch_f
# Explicit upper-triangular.
chol = Cholesky(lower=False)(x) chol = Cholesky(lower=False)(x)
ch_f = function([x], chol) ch_f = function([x], chol)
yield check_upper_triangular, pd, ch_f yield check_upper_triangular, pd, ch_f
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论