On Thursday, 26 September 2013 17:13:28 UTC-3, Nils Bruin wrote:
<...> 

> The problem is that subs expects the keys for its dictionary to be 
> symbolic variables, not strings. If you do
>  
> sage: P2={SR(k):v for k,v in params.iteritems()}
> sage: (sols[0][0].rhs()).subs(P2)
>
> it should work. As you found, unpacking into keyword arguments using ** 
> works too if all your keys are strings.
>
> Since x.subs({'x': 1}) will never work, we could pre-process the 
> dictionary, calling SR(s) on any string keys. That would add more magic, 
> though, which would go badly with the .subs methods on, say, polynomial 
> rings etc.
>
>
Great info! I am affraid I am at the start of the learning curve with sage. 
I guess all will start to fall into place once I get more familiar with 
sage's types

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to