If you want to wrap builtin function you could derive the BuiltinFunction class and simply overload the eval and call methods. (ok simply perhaps understates the problem, because the _call_ method in BuiltinFunction is quite complex). Coercion is currently still a little problem, and I think you would earn some credits here if add this ability to the call method in BuiltinFunction. Have you ever looked into that class? Perhaps it helps you understanding the problem.
I'm still writing on the orthogonal polynomials, and I have similar problems, but with other data types. You could look on the code I posted on trac if it helps you: http://trac.sagemath.org/sage_trac/ticket/9706 If you need a quick solution, simply writing a small python class would do the trick. (similar as in the current ortho_polys version) regards, maldun On 18 Jan., 17:13, Chris Swierczewski <cswie...@gmail.com> wrote: > > Try map instead: map(theta,[x,x^2,x^3]), because map applies the > > function > > to every list element. > > Thanks for the suggestion but theta is, in fact, a vector-valued function. It > acts on the elements of the input list / vector in a non-linear and > non-trivial way. So I'm looking for ways to craete a function (perhaps > wrapping BuiltinFunction) that can recognize and evaluate vectors over SR. > > The issue is that theta currently can only evaluate numerical input. (Over > ComplexField.) There's a lot of numerical approximation going on so simply > feeding it symbolic types isn't going to work. Hence, the need for some sort > of wrapper around this numerical theta that will deal with symbolic input > appropriately. > > -- > Chris -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org