[sage-support] Re: symmetric polynomials

2010-07-20 Thread kcrisman
It doesn't seem there is one at this point, though there is a lot of stuff for using them. This is now http://trac.sagemath.org/sage_trac/ticket/9558 . - kcrisman On Jul 20, 7:11 am, Epsilon wrote: > Hi, > > I would like to know if there are any function that says if a > polynomial is or not s

Re: [sage-support] combinatoric polynomials

2010-07-20 Thread Mike Hansen
On Tue, Jul 20, 2010 at 4:26 PM, tvn wrote: > Is there a built in function that given  n variables and d degree, > compute all the terms from degree 0 to d  of all those n variables > combined ? The # of terms =  bionomial(n+d,d) Not built in exactly, but here is one way: sage: vars = (1,) + va

[sage-support] combinatoric polynomials

2010-07-20 Thread tvn
Is there a built in function that given n variables and d degree, compute all the terms from degree 0 to d of all those n variables combined ? The # of terms = bionomial(n+d,d) For example variables = y, q, d, x, dd, r degree = 2 results [1, y, y^2, q, q^2, q*y, d, d^2, d*y, d*q, x, x^2, x

[sage-support] Re: passing coefficient ring and indeterminant to a function to return a polynomial in the intended polynomialRing

2010-07-20 Thread Simon King
Hi! On 20 Jul., 22:58, eggartmumie wrote: > def goppapolynomial(F,z): # return a Goppa polynomial in z over ring > or field F >     X = str(z); R. = PolynomialRing(F); >     return R(X^(N-K)); First of all, the notation R. = F[] will work on the command line, but will not work in a .py file, bec

[sage-support] passing coefficient ring and indeterminant to a function to return a polynomial in the intended polynomialRing

2010-07-20 Thread eggartmumie
Hi, to no avail I experimented e.g. with def goppapolynomial(F,z): # return a Goppa polynomial in z over ring or field F X = str(z); R. = PolynomialRing(F); return R(X^(N-K)); and some routine which given some 'goppapolynomial' as input constructs the coefficients w.r.t. the canonical m

[sage-support] Re: tell to sage "do something if you can but if you can not, pass to anything else"

2010-07-20 Thread Rolandb
Hi, I looked at ticket 9537, and I wondered why not the main part of 9451 was integrated? http://trac.sagemath.org/sage_trac/attachment/ticket/9451/sieve_of_atkin.patch It seems that a combination is far more powerful. Roland On 19 jul, 21:32, William Stein wrote: > Hi, > > On this topic, Seb

[sage-support] fast_float (in plot) and usual eval are different.

2010-07-20 Thread Francois Maltey
Hello, I'm using Sage and try some months ago to plot a very long expression, and that fails ! (see http://trac.sagemath.org/sage_trac/ticket/7165) Today I test with the shorter command, and I get a NotANumber answer with fast_float used by plot. sage: var ('m') ; rr = abs (sqrt (m^2-1)) ;

[sage-support] Re: Importing a Python module

2010-07-20 Thread KvS
On Jul 21, 2:34 am, Mike Hansen wrote: > On Tue, Jul 20, 2010 at 9:27 AM, KvS wrote: > > Thanks for the quick reply. I tried putting "from sage.all import *" > > Could you post the code tohttp://sage.pastebin.com.  It is better to > avoid using "import *" and explicitly list the things that you w

[sage-support] Re: Importing a Python module

2010-07-20 Thread KvS
On Jul 21, 2:34 am, Mike Hansen wrote: > On Tue, Jul 20, 2010 at 9:27 AM, KvS wrote: > > Thanks for the quick reply. I tried putting "from sage.all import *" > > Could you post the code tohttp://sage.pastebin.com.  It is better to > avoid using "import *" and explicitly list the things that you w

Re: [sage-support] Re: Importing a Python module

2010-07-20 Thread Mike Hansen
On Tue, Jul 20, 2010 at 9:27 AM, KvS wrote: > Thanks for the quick reply. I tried putting "from sage.all import *" Could you post the code to http://sage.pastebin.com . It is better to avoid using "import *" and explicitly list the things that you want to import. That way you know what objects

[sage-support] Re: Importing a Python module

2010-07-20 Thread KvS
On Jul 21, 2:01 am, Mike Hansen wrote: > On Tue, Jul 20, 2010 at 8:58 AM, KvS wrote: > > So I guess my problem is that I don't understand the namespaces > > involved somehow, since sgn() lives somewhere in a Sage namespace and > > importing doesn't place the code in the right name space or someth

Re: [sage-support] Importing a Python module

2010-07-20 Thread Mike Hansen
On Tue, Jul 20, 2010 at 8:58 AM, KvS wrote: > So I guess my problem is that I don't understand the namespaces > involved somehow, since sgn() lives somewhere in a Sage namespace and > importing doesn't place the code in the right name space or something? > Does anybody have a hint how I may do thi

[sage-support] Importing a Python module

2010-07-20 Thread KvS
Dear all, I was trying to find a way to import code form a python file to my notebook (the reason is mainly to save long code in a different place as just a plain text file, and also to be able to work on the code in a Python editor). However, if I copy-paste working code from a notebook to an edi

[sage-support] symmetric polynomials

2010-07-20 Thread Epsilon
Hi, I would like to know if there are any function that says if a polynomial is or not symmetric (like: 'is_symmetric'), so Mathematica have this kind of function. http://en.wikipedia.org/wiki/Symmetric_polynomial Thanks! Esther -- To post to this group, send email to sage-support@googlegrou

[sage-support] fast_float() trashes worksheet namespace

2010-07-20 Thread Daniel Friedan
fast_float(p) trashes the worksheet namespace when p is a polynomial with 60,000 terms. I tried to pin down the minimum number of terms that produce this bug, arriving at 56093, but the bug was not consistent. (Sage 4.3.4 under Linux, Sage 4.4.4 under OS X 10.6.4) sage: Nterms = 6 sage: RQ