提交 a47d605f authored 作者: Frederic's avatar Frederic

pep8

上级 179d464b
......@@ -4956,15 +4956,15 @@ class t_dot(unittest.TestCase):
def test_broadcastable_patterns(self):
#
# These examples should all work because we broadcastable or no, all dimensions of all
# results have size 1.
# These examples should all work because we broadcastable or
# no, all dimensions of all results have size 1.
#
def val_for(r):
if r.dtype.startswith('complex'):
# We want to test complex at the same time, so we give a value
# To the imaginary component.
# This strange way of doing things is the only way that worked on
# numpy 1.4.1
# This strange way of doing things is the only way that worked
# on numpy 1.4.1
if r.ndim == 0:
return numpy.asarray(numpy.complex(1.1, 2.1),
dtype=r.dtype)
......@@ -4989,10 +4989,12 @@ class t_dot(unittest.TestCase):
for dtype0 in ('float32', 'float64', 'complex64', 'complex128'):
for dtype1 in ('float32', 'float64', 'complex64', 'complex128'):
for bc0 in ((True,), (False,), (True, True), (True, False), (False, True),
(False, False)):
for bc1 in ((True,), (False,), (True, True), (True, False), (False, True),
for bc0 in ((True,), (False,), (True, True),
(True, False), (False, True),
(False, False)):
for bc1 in ((True,), (False,), (True, True),
(True, False), (False, True),
(False, False)):
x = TensorType(dtype=dtype0, broadcastable=bc0)()
y = TensorType(dtype=dtype1, broadcastable=bc1)()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论