On Mon, May 11, 2015 at 12:05 AM, Amit Saha <[email protected]> wrote: > Hi all, > > Is this the best way to check whether an expression is an inequality ?
Yes, except note that Relational can also be Eq(). > >>>> expr = x - 4 > 0 >>>> isinstance(expr, Relational) > True >>>> expr = x - 4 >= 0 >>>> isinstance(expr, Relational) > True >>>> expr = x - 4 <= 0 >>>> isinstance(expr, Relational) > True > > > Also, can I submit a change to allow "Relational" to be imported from > sympy instead of having to do: > from sympy.core.relational import Relational ? Are there other examples of base classes being importable directly from sympy? Aaron Meurer > > > Thanks, > Amit. > > > -- > http://echorand.me > > -- > 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 post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CANODV3%3DvucTS_UEXT0Bxgy0%3D7YFGxrAsTcPBTN5ac057uDZUyA%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6LYvTV%2B2n0%2BRhOqAxKKD0to%2BtQUQbVtPURL6N38FHSvMQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
