That makes sense, but I'm not sure whether "Garbage in - Garbage Out" should apply or whether SymPy should throw and error.
Jason moorepants.info +01 530-601-9791 On Thu, Apr 23, 2015 at 2:57 PM, Amit Saha <[email protected]> wrote: > Hi all, > > Let's say I have a symbol: > > >>> x = Symbol('x', positive=True) > > Should the below substitution be permitted: > > >>> (x+1).subs({x:-5}) > -4 > > My thinking is if x is declared to be positive, substituting negative > values should result in an error. Does that make sense? > > Best, > 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/CANODV3kKyVJ0%2BH4DmzTdVpgmuKYfmMRiwvODH420OzjRoKJi6w%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/CAP7f1Ah9pU9C2-EG9M1mZX75wOtORGWk6SwTuA18cJr7TaAN8Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
