Exemplo n.º 1
0
 def conjugate(self) -> "ParameterExpression":
     """Return the conjugate."""
     if HAS_SYMENGINE:
         conjugated = ParameterExpression(
             self._parameter_symbols, symengine.conjugate(self._symbol_expr)
         )
     else:
         conjugated = ParameterExpression(self._parameter_symbols, self._symbol_expr.conjugate())
     return conjugated
Exemplo n.º 2
0
def test_conjugate():
    assert conjugate(pi) == pi
    assert conjugate(I) == -I