Nick Alexander wrote:
> 
> On 27-Oct-09, at 3:17 PM, Jason Grout wrote:
> 
>> I was looking at how to make my calc 3 calculations easier to  
>> understand
>> by calling a multivariable function with a vector input.  I ended up
>> with a coercion error.  I'm not that familiar with how to work with  
>> the
>> coercion system.  Would it be easy to make the call "f(r)" work below?
>>
>> Thanks,
>>
>> Jason
>>
>>
>> sage: var('t')
>> t
>> sage: r=vector([t,t^2])
>> sage: f(x,y)=x^2+y
>> sage: f(r)
> 
> This isn't really a coercion error.  f expects two inputs; you've  
> given it one.  Try f(*r).
> 
> Fixing this means adding yet another special case; I vote strongly  
> against.  (BTW, all my work these days involves symbolic functions of  
> vector inputs, so I've dealt with this a lot and still believe adding  
> a special case is a bad idea.)


Why do you think that f, which is a function from R^2->R^1, should not 
naturally be able to take inputs that live in R^2?

Thanks,

Jason



-- 
Jason Grout


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to