On Mon, Mar 30, 2015 at 9:14 AM, Pedro Cruz <
pedrocr...@gmail.com> wrote:
> In one variable
>
> sage: x.subs(x==10)
>
> works ok.
>
> How to do a pair substitution ?
var("x,y")
t = (x,y) # this is a tuple
tuple([a.subs(x=10,y=20) for a in t])
tuple([a.subs({x:10,y:20}) for a in t])
vector([x,y]).subs(x=10,y=20) # this is a vector
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-03-30-093420-subs.sagews
>
> sage: var("x,y")
> (x, y)
> sage: (x,y).subs([x==10,y==20])
> ---------------------------------------------------------------------------
> AttributeError: 'tuple' object has no attribute 'subs'
> ---------------------------------------------------------------------------
>
> # Sage Version 6.2, Release Date: 2014-05-06 │
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to
sage-s...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/sage-support.
> For more options, visit
https://groups.google.com/d/optout.
--
William (
http://wstein.org)