提交 9da50f5d authored 作者: abalkin's avatar abalkin

Added TensorVariable.conjugate as an alias to conj.

上级 ed61933a
...@@ -1794,6 +1794,8 @@ class _tensor_py_operators: ...@@ -1794,6 +1794,8 @@ class _tensor_py_operators:
"""See `theano.tensor.conj`""" """See `theano.tensor.conj`"""
return conj(self) return conj(self)
conjugate = conj
def repeat(self, repeats, axis=None): def repeat(self, repeats, axis=None):
"""See `theano.tensor.repeat`""" """See `theano.tensor.repeat`"""
from theano.tensor.extra_ops import repeat from theano.tensor.extra_ops import repeat
......
...@@ -7051,6 +7051,7 @@ class TestTensorInstanceMethods(unittest.TestCase): ...@@ -7051,6 +7051,7 @@ class TestTensorInstanceMethods(unittest.TestCase):
Z = X + Y * 1j Z = X + Y * 1j
z = x + y * 1j z = x + y * 1j
assert_array_equal(Z.conj().eval({Z: z}), z.conj()) assert_array_equal(Z.conj().eval({Z: z}), z.conj())
assert_array_equal(Z.conjugate().eval({Z: z}), z.conj())
def test_round(self): def test_round(self):
X, _ = self.vars X, _ = self.vars
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论