Coming late to this... On Friday, March 4, 2016 at 9:39:41 PM UTC+1, Nils Bruin wrote: > > - a way of specifying a piecewise function *using expressions*, i.e., > something along the lines of > > piecewise([[(-1,1),x],[(1,2),x^2]],arguments=(x,)) >
This is implemented in the current #14801 branch with the keyword var. > as a replacement for > > piecewise([[(-1,1),x.function(x)],[(1,2),(x^2).function(x)]]) > > note that the present situation allows for > > piecewise([[(-1,1),x],[(1,2),y^2]) > > which I think is worth getting rid of. > This behaves now different in #14801: sage: piecewise([[(-1,1),x],[(1,2),y^2]]) piecewise(x|-->x on (-1, 1), x|-->y^2 on (1, 2); x) > There needs to be some indication somewhere in what way the interval > relates to the variables in the expression. > ... Regards, -- 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.