#14780: allow embedding python tuples in SR
-------------------------------------+-------------------------------------
       Reporter:  burcin             |        Owner:  burcin
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.2
      Component:  symbolics          |   Resolution:
       Keywords:  sd48               |    Merged in:
        Authors:  Burcin Erocal      |    Reviewers:  Volker Braun
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vbraun/python_tuples_in_SR       |  0d07667b860634f438007d427353e2833c7ec9af
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by vbraun:

Old description:

> Attached patch allows embedding Python tuples in symbolic expressions:
>
> {{{
> sage: t = SR._force_tuple((1, 2, x, x+1, x+2))
> sage: t
> (1, 2, x, x + 1, x + 2)
> sage: t.subs(x = 2*x^2)
> (1, 2, 2*x^2, 2*x^2 + 1, 2*x^2 + 2)
> sage: t.op[0]
> 1
> sage: t.op[2]
> x
> }}}
>
> Apply: [attachment:trac_14780-embed_tuples_in_SR.patch]

New description:

 Attached patch allows embedding Python tuples in symbolic expressions:
 {{{
 sage: t = SR._force_tuple((1, 2, x, x+1, x+2))
 sage: t
 (1, 2, x, x + 1, x + 2)
 sage: t.subs(x = 2*x^2)
 (1, 2, 2*x^2, 2*x^2 + 1, 2*x^2 + 2)
 sage: t.op[0]
 1
 sage: t.op[2]
 x
 }}}

 Updated tarball http://boxen.math.washington.edu/home/vbraun/upstream
 /pynac-4c798d4cb4b5.tar.bz2

--

--
Ticket URL: <http://trac.sagemath.org/ticket/14780#comment:36>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to