提交 5907d548 authored 作者: Frederic's avatar Frederic

Fix a test following another change.

上级 b3205b23
...@@ -577,6 +577,13 @@ class T_sum_dtype(unittest.TestCase): ...@@ -577,6 +577,13 @@ class T_sum_dtype(unittest.TestCase):
for input_dtype in imap(str, theano.scalar.all_types): for input_dtype in imap(str, theano.scalar.all_types):
x = tensor.matrix(dtype=input_dtype) x = tensor.matrix(dtype=input_dtype)
for output_dtype in imap(str, theano.scalar.all_types): for output_dtype in imap(str, theano.scalar.all_types):
# If the output is a complex, the gradient of the sum will
# cast the complex to the input dtype. We can't call the normal
# cast on a complex to a not complex as this is ambiguous.
if (not input_dtype.startswith('complex') and
output_dtype.startswith('complex')):
continue
axis = axes[idx % len(axes)] axis = axes[idx % len(axes)]
# If output_dtype would force a downcast, we expect a TypeError # If output_dtype would force a downcast, we expect a TypeError
# We always allow int/uint inputs with float/complex outputs. # We always allow int/uint inputs with float/complex outputs.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论