Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

import sage.rings.polynomial.multi_polynomial_sequence

Hi all:

I'm writing some new Sage code to do partial fraction decompositions of multivariate rational expressions and want to use the Sequence() and algebraic_dependence() methods from sage.rings.polynomial.multi_polynomial_sequence. What's the best import call to use?

I've played around with various import calls, and most recently tried

   from sage.structure.sequence import *
   from sage.rings.polynomial.polynomial_ring_constructor import *
   from sage.rings.polynomial.multi_polynomial_sequence import *

which i thought would work and be overkill, but i got the error message

   /Applications/sage/local/lib/python2.6/site-packages/sage/rings/polynomial/multi_polynomial_sequence.pyc
in algebraic_dependence(self)
   600             T = T+'T'
   601         Ts = [T + str(j) for j in range(r)]
--> 602         RR = PolynomialRing(K,d+r,tuple(Xs+Ts))
   603         Vs = list(RR.gens())
   604         Xs = Vs[0 :d]

NameError: global name 'PolynomialRing' is not defined

Any advice on this particular import or imports in general would be appreciated.

Thanks.

import sage.rings.polynomial.multi_polynomial_sequence

Hi all:

I'm writing some new Sage code to do partial fraction decompositions of multivariate rational expressions and want to use the Sequence() and algebraic_dependence() methods from sage.rings.polynomial.multi_polynomial_sequence. What's the best import call to use?

I've played around with various import calls, and most recently triedtried the following from within the function i'm writing.

   from sage.structure.sequence import *
   from sage.rings.polynomial.polynomial_ring_constructor import *
   from sage.rings.polynomial.multi_polynomial_sequence import *

which i I thought that would work and be overkill, but i got the error message

   /Applications/sage/local/lib/python2.6/site-packages/sage/rings/polynomial/multi_polynomial_sequence.pyc
in algebraic_dependence(self)
   600             T = T+'T'
   601         Ts = [T + str(j) for j in range(r)]
--> 602         RR = PolynomialRing(K,d+r,tuple(Xs+Ts))
   603         Vs = list(RR.gens())
   604         Xs = Vs[0 :d]

NameError: global name 'PolynomialRing' is not defined

Any advice on this particular import or imports in general would be appreciated.

Thanks.