#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       |  c1cf3fc54366d600d84d6a9648eced5034ea10bc
   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
> }}}
>
> Updated tarball http://boxen.math.washington.edu/home/vbraun/upstream
> /pynac-4c798d4cb4b5.tar.bz2

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

 Includes pynac 0.3.2 update for explicit template instantiatitons

 http://boxen.math.washington.edu/home/vbraun/upstream/pynac-0.3.2.tar.bz2

--

--
Ticket URL: <http://trac.sagemath.org/ticket/14780#comment:38>
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