On Tue, 28 Sept 2021 at 10:22, Aaron Meurer <[email protected]> wrote:
> Why not just Lambda(x, Eq(x, 1))? > > I don't think redefining __eq__ to return a symbolic result is a good > idea. You're liable to get a lot of "TypeError: cannot determine truth > value of Relational" errors from using that object. There is a missing context for the question in this thread: https://github.com/sympy/sympy/pull/22152#discussion_r716898734 The OracleGate class has a non-Basic lambda function in its args: In [3]: from sympy.physics.quantum.grover import OracleGate In [4]: e = OracleGate(1, lambda x: x == 2) In [5]: e.args Out[5]: (1, <function __main__.<lambda>(x)>) The question was how you could sympify such a lambda function to Basic: https://github.com/sympy/sympy/pull/22152#issuecomment-928631629 -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxQ_SJA2S8Oc6Rmiu9Z3CBs5WnhnnePsvp-HcN11_0x1Jg%40mail.gmail.com.
