Dear all,

I am looking for a way to use lists or arrays of values in equations
in a similar way to Mathematica, Matlab or Fortran. A simple example
would be:

sage: f = 2*x^3+1
sage: v = [1,2,3]
sage: f(x=v)
Traceback (click to the left for traceback)
...
TypeError: cannot coerce type '<type 'list'>' into a
SymbolicExpression.

I would have liked something like [3,17,55] as a result. I tried
something similar with vectors, matrices and numpy arrays, but I
didn't manage to get the desired result. Is there an easy way of
performing operations on arrays or lists without defining loops?

Thanks for your help already!

Stan
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to