[sage-support] Re: trouble with polynomial functions, change of variables, and coefficients

2010-07-22 Thread Marc Mezzarobba
Ben a écrit : I'm trying to take a rational map on P^1 (i.e. f(x,y) = [deg 2 poly, deg 2 poly] and conjugate, but I can't seem to get sage to cooperate. I would like to take a generic degree 2 map on P^1, and conjugate by an element of PGL_2. For example, I can do R.X,Y =

Re: [sage-support] attach file.sage, load file.sage, or execfile ?

2010-07-22 Thread William Stein
On Thu, Jul 22, 2010 at 4:03 AM, Nathann Cohen nathann.co...@gmail.com wrote: Hello everybody !!! I began to use Sage's attach and load functions not so long ago, and I stopped very soon to resume using the good old execfile. My problem is that when a script loaded with attach or load fails

[sage-support] Re: trouble with polynomial functions, change of variables, and coefficients

2010-07-22 Thread Ben
Yes. Now ZZ[0].coefficients() works. Thanks. On Jul 22, 2:22 am, Marc Mezzarobba m...@mezzarobba.net wrote: Ben a crit : I'm trying to take a rational map on P^1 (i.e. f(x,y) = [deg 2 poly, deg 2 poly] and conjugate, but I can't seem to get sage to cooperate. I would like to take a

[sage-support] speed issue when calculating a symbolic determinant

2010-07-22 Thread Ben
I have written a function to compute the Macaulay resultant of 3 degree 2 homogenous polynomials via the determinant of a matrix depending on the coefficients. It seems to take a very long time to compute the determinant, I didn't actually get it to finish (which is not true in Pari/gp). I was

[sage-support] Sparse Vector Bug?

2010-07-22 Thread VictorMiller
I'd like to construct a sparse vector (say a unit vector in 100 dimensional space) by saying a = vector(GF(2),100,dict([(22,1)]),sparse=True) However, this gives the error message below. This seems like a bug to me. Victor ValueError: incompatible degrees in vector constructor Traceback

[sage-support] Linear Programming Error

2010-07-22 Thread tvn
I am trying to solve this simple linear programming prob using MixedIntegerLinearProgram and it gives an AttributeError: LinearFunction instance has no attribute '__float__' exception sage: p = MixedIntegerLinearProgram(maximization=True) sage: x = p.new_variable() sage: p.add_constraint(x[0] +

[sage-support] repr of dense matrices

2010-07-22 Thread VictorMiller
I had thought that repr(A) (where A is some object) was supposed to be a string with property that eval(repr(A)) == A. However, if A is a dense matrix (whose size is above some threshold) what I get instead is something like: '212 x 212 dense matrix over Finite Field of size 2' I could

[sage-support] how to use jsmath in notebook

2010-07-22 Thread 3DRaven
How to use jsmath and what need this button in the sage-notebook? Please show a screenshot with the correct work jsmath. -- 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

[sage-support] Re: how to use jsmath in notebook

2010-07-22 Thread 3DRaven
Can I do so that would be a formula in the cells sage-notebook as editing replaced their latex presentation? That would be much nicer to work with them! Thank you. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] Re: how to use jsmath in notebook

2010-07-22 Thread 3DRaven
latex-render (image) presentation. -- 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 http://groups.google.com/group/sage-support URL:

[sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread tvn
is there a trick to convert RealLiteral numbers to strings without the trailing zeros? e.g., 2. and 0.050 become 2 and 0.05 respectively -- -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread Martin Albrecht
sage: str(0.53253453425).rstrip(.0) '0.53253453425' sage: str(2).rstrip(.0) '2' On 22 July 2010 22:26, tvn nguyenthanh...@gmail.com wrote: is there a trick to convert RealLiteral  numbers to strings without the trailing zeros?  e.g., 2. and 0.050 become 2 and 0.05

Re: [sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread Mitesh Patel
On 07/22/2010 04:41 PM, Martin Albrecht wrote: On 22 July 2010 22:26, tvn nguyenthanh...@gmail.com wrote: is there a trick to convert RealLiteral numbers to strings without the trailing zeros? e.g., 2. and 0.050 become 2 and 0.05 respectively -- sage:

[sage-support] Re: converting RealLiteral to str without trailing zero's

2010-07-22 Thread tvn
stupid of me -- totally didn't pay attention to python string function ... thanks all On Jul 22, 4:06 pm, Mitesh Patel qed...@gmail.com wrote: On 07/22/2010 04:41 PM, Martin Albrecht wrote: On 22 July 2010 22:26, tvn nguyenthanh...@gmail.com wrote: is there a trick to convert RealLiteral  

[sage-support] Problem solving system of ODEs

2010-07-22 Thread Richard
Hello, I am trying to solve a small system of ODEs, following the tutorial on the SAGE homepage; however, I only receive an error message. What am I doing wrong? Here is my code: t = var ('t') S_0 = 1.5 X_0 = 0.05 Y_XS = 0.5 K_S = 0.007 mu_max = 0.8 X = function ('X', t)

[sage-support] Re: Problem solving system of ODEs

2010-07-22 Thread Richard
Forgot to mention: This is SAGE 4.5.1. Richard -- 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 http://groups.google.com/group/sage-support

[sage-support] Re: Problem solving system of ODEs

2010-07-22 Thread Richard
Sorry for spamming, but I figured my initial code didn't make sense in the way mu was computed; so I changed it to the following. The error message stays the same, though. t = var ('t') S_0 = 1.5 X_0 = 0.05 Y_XS = 0.5 K_S = 0.007 mu_max = 0.8 X = function ('X', t) S =

[sage-support] Re: repr of dense matrices

2010-07-22 Thread kcrisman
Sometimes I've used A.rows(), I think, but you'll note that we also get sage: A = matrix(55) sage: A 55 x 55 dense matrix over Integer Ring (type 'print A.str()' to see all of the entries) I'll not include the output of A.str() :) I don't know if this is what you want, though of course one

[sage-support] Re: Linear Programming Error

2010-07-22 Thread Nathann Cohen
Hello !! I am trying to solve this simple linear programming prob using MixedIntegerLinearProgram and it gives an AttributeError: LinearFunction instance has no attribute '__float__' exception This is mainly my fault, and the reason is that min/max arguments do not like to get something

[sage-support] Re: how to use jsmath in notebook

2010-07-22 Thread kcrisman
Also:  It's quite possible that someone in the worldwide Sage user-developer community is fluent (or can reply much better than I could!) in your language(s) of fluency.  But I'm not sure about official sage-* group policy.  Are there are dedicated non-English language groups (mailing lists

[sage-support] Re: Linear Programming Error

2010-07-22 Thread Nathann Cohen
This is now patch #9579, which is waiting for review :-) Nathann -- 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

[sage-support] Re: Problem solving system of ODEs

2010-07-22 Thread kcrisman
On Jul 22, 8:25 pm, Richard rich...@r-selected.de wrote: Sorry for spamming, but I figured my initial code didn't make sense in the way mu was computed; so I changed it to the following. The error message stays the same, though. t = var ('t') S_0 = 1.5 X_0 = 0.05

[sage-support] Re: repr of dense matrices

2010-07-22 Thread Jason Grout
On 7/22/10 1:21 PM, VictorMiller wrote: I had thought that repr(A) (where A is some object) was supposed to be a string with property that eval(repr(A)) == A. However, if A is a dense matrix (whose size is above some threshold) what I get instead is something like: '212 x 212 dense matrix over

[sage-support] Re: converting RealLiteral to str without trailing zero's

2010-07-22 Thread Jason Grout
On 7/22/10 2:26 PM, tvn wrote: is there a trick to convert RealLiteral numbers to strings without the trailing zeros? e.g., 2. and 0.050 become 2 and 0.05 respectively -- For now, you can use the skip_zeroes argument to str: sage: a=2. sage: a

[sage-support] Re: converting RealLiteral to str without trailing zero's

2010-07-22 Thread Jason Grout
On 7/22/10 2:26 PM, tvn wrote: is there a trick to convert RealLiteral numbers to strings without the trailing zeros? e.g., 2. and 0.050 become 2 and 0.05 respectively -- Also, you could just convert to python floats, which by default don't print trailing zeros

[sage-support] Functional Programming doubt

2010-07-22 Thread vasu
Hi I am trying to use something like the filter() command, for this purpose mentioned below: I am iterating through all partitions p of a fixed length k ( let's say using Partitions (size, length=k) ) and I have written a function which return true if the partition p has atleast one part

Re: [sage-support] Functional Programming doubt

2010-07-22 Thread Dan Drake
On Thu, 22 Jul 2010 at 10:04PM -0700, vasu wrote: I am trying to use something like the filter() command, for this purpose mentioned below: I am iterating through all partitions p of a fixed length k ( let's say using Partitions (size, length=k) ) and I have written a function which return