Re: [sage-support] Re: rexpression of lists

2010-09-03 Thread andrew ewart
finally getting somewhere now get this output [1, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0] [0, 0] [0, 0] [0, 0] [0, 0] [0, 0] [0, 0] [0, 0] [0, 0] [t, 0, t, 0, 2*t, 0, 3*t, 0, 0] [0, 1] [0, 0] [0, 1] [0, 0] [0, 2] [0, 0] [0, 3] [0, 0] [0, 0] this is very close all i want to do is now join each collection

[sage-support] rexpression of lists

2010-09-02 Thread andrew ewart
suppose i have a list of the form l=[a+b*x+c*x^2, d+e*x+f*x^2] how do i use l[n].list() correctly to produce [a,b,c,d,e,f] as at the moment im only getting [a,b,c] then getting an error of list index out of range code would be for n in xrange(0,6): for ja in range(0,2):

Re: [sage-support] Re: rexpression of lists

2010-09-02 Thread andrew ewart
the variable is x in this case also im running this out of sage in a file, then loading the file in sage so i dont to use var(...) also i feel ill need 2 loops 1 to go through each component on the list and a second to extract the coefficints of each component wrt 1,x and x^2 (in this case) --

Re: [sage-support] Re: rexpression of lists

2010-09-02 Thread andrew ewart
and the final printout should be (in this case) [a,b,c,d,e,f] -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at

Re: [sage-support] Re: rexpression of lists

2010-09-02 Thread andrew ewart
well i was trying to use that example to see how i could work it in this case S = GF(5) R.z1, z2=PolynomialRing(S, 2, z); f = z2^2+z1^2+3 T.x=PolynomialRing(S) def factor_bivar(f): q = S.cardinality() fx0 = T(f(x,0)) fac = fx0.factor() l =

Re: [sage-support] Re: rexpression of lists

2010-09-02 Thread andrew ewart
well i was trying to use that example to see how i could work it in this case S = GF(5) R.z1, z2=PolynomialRing(S, 2, z); f = z2^2+z1^2+3 T.x=PolynomialRing(S) def factor_bivar(f): q = S.cardinality() fx0 = T(f(x,0)) fac = fx0.factor()

Re: [sage-support] Re: rexpression of lists

2010-09-02 Thread andrew ewart
well i was trying to use that example to see how i could work it in this case S = GF(5) R.z1, z2=PolynomialRing(S, 2, z); f = z2^2+z1^2+3 T.x=PolynomialRing(S) def factor_bivar(f): q = S.cardinality() fx0 = T(f(x,0)) fac = fx0.factor()

Re: [sage-support] Re: quickhand vector

2010-09-01 Thread andrew ewart
i dont think my previous example was clear so ill try to do a new one that achieves the same result let F=f(x,y) where degx is the degree of F wrt x and degy is the degree of F wrt y G=f(t,z) got vector (G^0,G^1,G^2,...,G^degx)

[sage-support] Re: quickhand vector

2010-09-01 Thread andrew ewart
hmm it looks like a start but doesn't do exactly what i want given a field GF(5) have F=f(x,y)=x^2+y^2+3 and G=f(t,z)=3*t*z^2 + t degx=degy=2, d=8, degt=degx-1 =1, degz=d=8 have vector (G^0,G^1,G^2)=(1,3*t*z^2 + t, 3*z^4 + 2*z^2 + 2) (in this case G^2 though wont be in matrix, so ignore but other

[sage-support] Re: quickhand vector

2010-09-01 Thread andrew ewart
-- Forwarded message -- From: andrew ewart aewartma...@googlemail.com Date: Sep 1, 5:10 pm Subject: quickhand vector To: sage-support hmm it looks like a start but doesn't do exactly what i want given a field GF(5) have F=f(x,y)=x^2+y^2+3 and G=f(t,z)=3*t*z^2 + t degx=degy=2

[sage-support] Re: quickhand vector

2010-09-01 Thread andrew ewart
hmm it looks like a start but doesn't do exactly what i want given a field GF(5) have F=f(x,y)=x^2+y^2+3 and G=f(t,z)=3*t*z^2 + t degx=degy=2, d=8, degt=degx-1 =1, degz=d=8 have vector (G^0,G^1,G^2)=(1,3*t*z^2 + t, 3*z^4 + 2*z^2 + 2) (in this case G^2 though wont be in matrix, so ignore but other

[sage-support] Re: quickhand vector

2010-09-01 Thread andrew ewart
hmm it looks like a start but doesn't do exactly what i want given a field GF(5) have F=f(x,y)=x^2+y^2+3 and G=f(t,z)=3*t*z^2 + t degx=degy=2, d=8, degt=degx-1 =1, degz=d=8 have vector (G^0,G^1,G^2)=(1,3*t*z^2 + t, 3*z^4 + 2*z^2 + 2) (in this case G^2 though wont be in matrix, so ignore but

[sage-support] quickhand vector

2010-08-31 Thread andrew ewart
how do i use the vector command correctly so i can generate a vector of a given length but not by inputing each value by hand and have it that all values are stored to be used later eg (this doesnt work as far as im aware) n=10 v=vector(n) for i in xrange(1,n) v[i]=2^n print v -- To post to

[sage-support] quickhand vector

2010-08-31 Thread andrew ewart
how do i use the vector command correctly so i can generate a vector of a given length but not by inputing each value by hand and have it that all values are stored to be used later eg (this doesnt work as far as im aware) n=10 v=vector(n) for i in xrange(1,n) v[i]=2^n print v -- To post to

[sage-support] Re: quickhand vector

2010-08-31 Thread andrew ewart
On Aug 31, 7:31 pm, andrew ewart aewartma...@googlemail.com wrote: how do i use the vector command correctly so i can generate a vector of a given length but not by inputing each value by hand and have it that all values are stored to be used later eg (this doesnt work as far as im aware) n

Re: [sage-support] Re: quickhand vector

2010-08-31 Thread andrew ewart
yes jason that got me started on this okay following from this i have k=10 f=y*x^2+y m=degf wrt x(=2), n=degf wrt y(=1) v=vector(f^i for i in xrange(0,k)) how do i turn this into a matrix of form a_0 a_0...n+1 times total...a_0 | a_1 a_1...|..|a_k-1...a_k-1 where of f is as above a_0 is

[sage-support] itteration in code

2010-08-29 Thread andrew ewart
From the following code S = GF(5) R.z1, z2=PolynomialRing(S, 2, z); f = z2-z1^2+1 T.x=PolynomialRing(S) def factor_bivar(f): q = S.cardinality() fx0 = T(f(x,0)) fac = fx0.factor() l =

Re: [sage-support] itteration in code

2010-08-29 Thread andrew ewart
okay, i got that now, but then how do i take the final ak (adegree) out of the loop and recognise that ak from further on -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more

Re: [sage-support] itteration in code

2010-08-29 Thread andrew ewart
well it is printing out the h as expected so that indentation is correct also the heavy indentation is to allow for puting in 2 for loops based around the function f, testing if its squarefree and monic wrt z1 although i am confused when i looked it up in sage that f.is_squareefree() is listed but

Re: [sage-support] itteration in code

2010-08-29 Thread andrew ewart
ahh that may explain it also i found a way to get the last itteration out of the loop by setting for... ak=... ad=ak print ak -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] Re: iteration from previous terms

2010-08-25 Thread andrew ewart
aah ur writing this in sage when i want to do this as a part of a file out of sage then complied in sage, also i want to store the final itteration so it can be used further on, so when i tried ur first suggestion it gives me the error yield ak SyntaxError: 'return' with argument inside

[sage-support] iteration from previous terms

2010-08-24 Thread andrew ewart
suppose we define a function f(x)=x^3+1 and define a_0=1 and then had the iteration a_n=f(a_n-1)/(a_n-1) how would one go about writing this in sage? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] quiery about polynomial rings

2010-08-19 Thread andrew ewart
If i input R.z1,z2=PolynomialRing(GF(5),2,z) direclty to sage it accepts it as a polynomial ring But if i try to save it as part of a .py file and then load it from there into sage ie sage my.py it gives me a syntax error what module am i missing and so what command do i need to make sage

Re: [sage-support] Possible bug in sample standard deviation

2010-05-24 Thread Andrew Hou
Well that's embarrassing. http://trac.sagemath.org/sage_trac/ticket/9028 Doctests all run. ~Andrew On Sun, May 23, 2010 at 11:03 PM, William Stein wst...@gmail.com wrote: On Sun, May 23, 2010 at 10:18 PM, TianWei ltwis...@gmail.com wrote: In the file sage/stats/basic_stats.py, we have

[sage-support] using parametric_plot for more than one function

2008-05-29 Thread andrew . sundstrom
, end_2 ).show() Is there a way to do this, either with this function or another one in Sage? Thanks, Andrew --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

[sage-support] Re: using parametric_plot for more than one function

2008-05-29 Thread andrew . sundstrom
x:sin(2*x) sage: f = Piecewise([[(0,1),f1],[(0,1),f2],[(0,1),f3], [(0,1),f4]]) sage: f.plot().show() On May 29, 1:17 pm, Mike Hansen [EMAIL PROTECTED] wrote: Hi Andrew, You can do this by saving the plots to an object and then adding them together. sage: t = var('t') sage: p1

[sage-support] numerical integration

2008-05-23 Thread andrew . sundstrom
I have a function that is not piecewise and cannot be symbolically integrated. Hence, I cannot use the Riemann or trapezoid approximations. Is there any other way in Sage to numerically integrate such a function? Thanks, Andrew --~--~-~--~~~---~--~~ To post

[sage-support] Re: numerical integration

2008-05-23 Thread andrew . sundstrom
approximations. Is there any other way in Sage to numerically integrate such a function? Thanks, Andrew --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options

[sage-support] linear algebra

2008-05-13 Thread andrew . sundstrom
for an overdetermined linear system. Can I do this with Sage? If so, would you kindly point me to the right place in the documentation. Many thanks, Andrew --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe

[sage-support] Intel Mac Sage -testall errors

2007-12-22 Thread Andrew Green
in 5.846s PASSED (successes=40) Testing of examples currently not implemented. Testing SAGE documentation Testing SAGE tutorial /Users/andrewsage-2.9-osx10.4-intel-i386-Darwin/local/bin/sage-maketest: line 18: cd: /Users/andrew/sage-2.9-osx10.4-intel-i386-Darwin/devel/doc/tut: No such file or directory

[sage-support] Re: Explicitly calling bitwise xor?

2007-06-09 Thread Andrew Budker
, but if there is another way to do it, I would greatly prefer that. thanks. -Andrew On Jun 8, 11:04 pm, William Stein [EMAIL PROTECTED] wrote: To avoid massive confusion the __xor__ operator is not defined for SAGE integers. Instead use the _xor function, which will be very fast: sage: n = 5; m

[sage-support] Explicitly calling bitwise xor?

2007-06-08 Thread Andrew Budker
= self.ideaMultiply(roundSubKeys[4], xor(temp[0],temp[2])) /home/abudker/Desktop/199/sage-2.5.0.2/devel/sage-main/sage/crypto/ element.pyx in element.Element.__xor__() type 'exceptions.RuntimeError': Use ** for exponentiation, not '^', which means xor thanks, -Andrew Budker

[sage-support] groups and character tables

2007-04-27 Thread Andrew
, Andrew Dittmer --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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

<    1   2