On Tue, Mar 31, 2009 at 9:34 AM, Martin Albrecht <[email protected]> wrote: > > On Tuesday 31 March 2009, William Stein wrote: >> R.ngens() >> >> On Tue, Mar 31, 2009 at 7:58 AM, [email protected] >> >> <[email protected]> wrote: >> > Dear all, >> > I am new to Sage and after reading the help, I couldn't find a >> > function that from a multivariate polynomial >> > returns the number of variables. >> > if >> > R=PolynomialRing(ZZ, 20, "z",order="deglex") >> > f=R.0*R.1 > > I think he wants: > > f.nvariables()
Ah, that works. Also one has: sage: R=PolynomialRing(ZZ, 20, "z",order="deglex") sage: f = R.0 sage: f.nvariables() 1 sage: f.parent().ngens() 20 William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
