Hi, I believe the solution of Nils using SR(0) is very elegant, but it cannot be applied in every case. For example, when the piecewise is created by another method (trapezoid):
f = Piecewise([[(-1,1), sin(x^2)]]) t = f.trapezoid(3) Here t has a constant part in (-1/3,1/3): Piecewise defined function with 3 parts, [[(-1, -1/3), -3/2*(x + 1)*(sin(1) - sin(1/9)) + sin(1)], [(-1/3, 1/3), sin(1/9)], [(1/3, 1), 1/2*(3*x - 1)*( sin(1) - sin(1/9)) + sin(1/9)]] So t(0.1) gives the following error: ValueError: the number of arguments must be less than or equal to 0 Best regards, Francisco Pena -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.