I am having difficulty using Piecewise(). For example, I can define the following: t = Piecewise([[(-oo, -1), 0*x^0], [(-1, 0), 1+x], [(0, 1), 1-x], [(1, oo), 0*x^0]], x) but then evaluating t(-100) fails. I can modify the above to have a finite domain: t = Piecewise([[(-10, -1), 0*x^0], [(-1, 0), 1+x], [(0, 1), 1-x], [(1, 10), 0*x^0]], x) This seems to evaluate correctly within its domain, but I can't plot it, say, with this (or variations thereof): plot(t(x), x, -4, 4)
What am I doing wrong? --Robert -- You received this message because you are subscribed to the Google Groups "sage-support" 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/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
