提交 7fc2bcbf authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Don't use floating-point axes.

上级 1f984665
...@@ -165,7 +165,7 @@ def test_argsort(): ...@@ -165,7 +165,7 @@ def test_argsort():
# Example 2 # Example 2
a = tensor.dmatrix() a = tensor.dmatrix()
axis = tensor.scalar() axis = tensor.lscalar()
w = argsort(a, axis) w = argsort(a, axis)
f = theano.function([a, axis], w) f = theano.function([a, axis], w)
for axis_val in 0, 1: for axis_val in 0, 1:
...@@ -183,7 +183,7 @@ def test_argsort(): ...@@ -183,7 +183,7 @@ def test_argsort():
# Example 4 # Example 4
a = tensor.dmatrix() a = tensor.dmatrix()
axis = tensor.scalar() axis = tensor.lscalar()
l = argsort(a, axis, "mergesort") l = argsort(a, axis, "mergesort")
f = theano.function([a, axis], l) f = theano.function([a, axis], l)
for axis_val in 0, 1: for axis_val in 0, 1:
...@@ -193,7 +193,7 @@ def test_argsort(): ...@@ -193,7 +193,7 @@ def test_argsort():
# Example 5 # Example 5
a = tensor.dmatrix() a = tensor.dmatrix()
axis = tensor.scalar() axis = tensor.lscalar()
a1 = ArgSortOp("mergesort", []) a1 = ArgSortOp("mergesort", [])
a2 = ArgSortOp("quicksort", []) a2 = ArgSortOp("quicksort", [])
# All the below should give true # All the below should give true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论