On Tue, Mar 31, 2009 at 12:24 PM, [email protected]
<[email protected]> wrote:
>
> Thank you very much Martin and William.
> Domingo,
>
> P. d. One question, for the next time,
> how I see the api of the multivariate polynomials?

If f is any object you can do

f.<tab key>

>
>
> On 31 mar, 18:47, William Stein <[email protected]> wrote:
>> 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
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

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

Reply via email to