[sage-support] Re: Memory leaks with LP Solvers are back

2014-11-11 Thread Simon King
Hi Peter, On 2014-11-11, Peter Mueller wrote: > Am Dienstag, 11. November 2014 12:20:30 UTC+1 schrieb Peter Mueller: >> while True: >> P = MixedIntegerLinearProgram(solver="Coin") >> >> eats several GB within a few seconds!!! The same with solver="Coin", but >> not with solver="glpk". I jus

[sage-support] Re: Memory leaks with LP Solvers are back

2014-11-11 Thread Simon King
Hi Peter, On 2014-11-11, Peter Mueller wrote: > A tentative solution seems to be to put a `collect()' inside the loop (and > a `from gc import collect' at the beginning of the program). Still, I > believe that this issue deserves attention. If gc.collect() solves the issue, then I suppose it i

[sage-support] Re: Interface to singular - quotient by an ideal

2014-11-07 Thread Simon King
Hi, On 2014-11-05, moep wrote: > (1) sage: singular.eval('ring r6 =3D (9,a), (x,y,z),lp')(2) 'ring r6 =3D (9= > ,a), (x,y,z),lp;'(3) sage: Q =3D singular('std(ideal(x^2,x+y^2+z^3))', type= >=3D'qring')(4) sage: Q.sage_global_ring()(5) Quotient of Multivariate Polyn= > omial Ring in x, y, z over F

[sage-support] Re: Formal methods are not human one

2014-10-29 Thread Simon King
Hi Christophe, ["Followup-To:" nach gmane.comp.mathematics.sage.support gesetzt.] On 2014-10-29, Christophe Bal wrote: > I'm looking for formal outputs that are not calculated as a human can do > (this is for a free french "book"). Do you know such kind of examples ? I don't understand your ques

[sage-support] Re: Accessing record fields in libgap

2014-10-01 Thread Simon King
On 2014-10-01, Volker Braun wrote: > > PS: A nicer way to create the libgap record from Python than evaluating > strings is to hand it a Python dict: libgap(dict(a=1, b=2)) In my applications, I have to read the records from a GAP-readable file. So, it will be libgap.Read(...). Anyway, the syn

[sage-support] Re: Accessing record fields in libgap

2014-10-01 Thread Simon King
Hi Dima, On 2014-10-01, Dima Pasechnik wrote: >> sage: R = libgap.eval('rec(a:=1, b:=2)') >> sage: R.RecFields() # So, creating the record did work >> [ "b", "a" ] > > R is a Python dictionary No, it isn't. sage: type(R) but... > So you just can do > > R["a"] > and get 1, Great, t

[sage-support] Accessing record fields in libgap

2014-10-01 Thread Simon King
Hi! I wonder: How does one access the fields of a record that is defined in libgap? If R is a record in GAP and f is one of its fields, then it can be accessed by R.f; however, this does not work in libgap: sage: R = libgap.eval('rec(a:=1, b:=2)') sage: R.RecFields() # So, creating the reco

[sage-support] Re: how to cancel a multi-line incomplete Sage command at the command-line?

2014-08-04 Thread Simon King
Hi John, On 2014-08-04, John H Palmieri wrote: > Is there any way to get back to > the Sage prompt without executing the command? > > Should we be configuring IPython or readline or something differently to > allow this? +1 I find this new behaviour of ctrl-c quite annoying. There should be

[sage-support] Re: Divisibility

2014-07-27 Thread Simon King
Hi, On 2014-07-27, Matematica pentru toți wrote: > I tried: > > while x<10: > if (124+5*x)%2==0: > print x, > x=x+1 > I suppose you need to define an initial value for x first (i.e. prepend the assignment x=0). Or, better: Use the fact that Sage's underlying language, both f

[sage-support] Re: random subs() surprise that has just kept me guessing for over an hour

2014-07-27 Thread Simon King
Hi Kevin, On 2014-07-27, Kevin Buzzard wrote: > [I've just build a degree 6 poly. Now let's build a degree 12 one] > > sage: h=expand((g.subs(x+2/x))*x^6) Let's work without the x^6 factor: sage: g x^6 + 2*x^3 + x + 1 sage: g.subs(x+2/x).expand() 2/x + 1/x^3 + 1/x^6 No idea what is goi

[sage-support] Re: Noncommutative algebra

2014-06-27 Thread Simon King
PS: On 2014-06-27, Simon King wrote: > However, unfortunately this doesn't work either (gives an error about > coercion), even though libsingular (which is used in the background) > should be able to work with function fields as base ring. This comes as > a surprise to me, an

[sage-support] Re: Noncommutative algebra

2014-06-27 Thread Simon King
Hi Nurdin, On 2014-06-26, Nurdin Takenov wrote: > I've tried > to do it like that: > > sage: F. = FreeAlgebra(QQ,3) > R. = F.g_algebra({y*x: a*x*y, a*x: x*a, y*a: a*y}) > > But it doesn't work. Is it because y*x=a*x*y is non-homogeneous? If so, > what should I do? The definition of a g-algebr

[sage-support] Re: Bivariate polynomial Euclid's division algorithm support

2014-05-30 Thread Simon King
Hi! On 2014-05-30, kundan kumar wrote: > Does sage have an implementation of Bivariate polynomial Euclid's division > algorithm? Yes, that's known as normal form computation in commutative algebra. > In particular, I want to divide f(x) = x^p - 1 by g(x,y) = (x-y)^2 - c. > Here, p is a large

[sage-support] Re: TypeError: 'sage.rings.integer.Integer' object is not iterableg

2014-05-29 Thread Simon King
Hi, On 2014-05-29, baby bunny wrote: > Hi, I'm new to sage. I'm reading the tutorial and trying out examples. But > when I try this example: > > sage: class Evens(list): > ... def __init__(self, n): > ... self.n = n > ... list.__init__(self, range(2, n+1, 2)) > ...

[sage-support] Re: How do you convert a string reprsentation of a polynomial back to a polynomial in a polynomial ring

2014-05-29 Thread Simon King
Hi Stephen On 2014-05-29, Stephen Kauffman wrote: > Specifically I have a polynomial such as mypoly = X*Y + 1 in > BooleanPoynomialRing() and str(mypoly) converts it to the string 'X*Y + 1' > then I do some stuff with re pattern matching to construct the string '1 - > x*y' which I now want to

[sage-support] Re: Simplify number

2014-05-29 Thread Simon King
Hi, On 2014-05-29, SiL588 . wrote: > Unfortunately I don't know the rules of Phyton language, Sage's main language for programming is Python, and also the language for user interaction is close to Python. We believe it is a big plus of Sage that it uses a mainstream language! I don't think it i

[sage-support] Re: Simplify number

2014-05-29 Thread Simon King
Hi! On 2014-05-29, SiL588 . wrote: > Hi, i tried to simplify a number doing this: > m1.simplify() > but the output is > > AttributeError: 'sage.rings.real_mpfr.RealNumber' object has no > attribute 'simplify' > > > What does it mean? > What did I do wrong? I declared m1 like this: > m1 = var('m

[sage-support] Re: Memory Leak in mutipolynomial evaluation

2014-05-25 Thread Simon King
Hi Gabriel, On 2014-05-25, Gabriel Furstenheim Milerud wrote: > There is a memory leak in the evaluation of multivariable polynomials: > > -C.=GF(2)[] > -f=x^4+x*y^3+z^6 > > -get_memory_usage() > .1014.47265625 > - for i in xrange(100): > a=f(1,0,0) > -get_memory_usage() > .1052.4

[sage-support] Re: Inheritance for elements (like Integer)

2014-05-11 Thread Simon King
Hi Gennady, On 2014-05-11, Gennady Uraltsev wrote: > Following the tutorial I should first start by defining the new elements. > In the tutorial the elements inherit from the generic "FieldElement". I > would like to inherit from "Integer" > sage: class NewIntEl(Integer): > def __init__

[sage-support] Re: Discrete Logarithm Algorithm

2014-05-04 Thread Simon King
Hi Jan, hi John, On 2014-05-04, John Cremona wrote: > On 4 May 2014 13:20, Jan Medina wrote: >> I wan to calculate log(\theta+i,\theta) for i in a finte field and theta a >> primtive element >> > > You can see the documentation of this function like this: > > sage: F=GF(101) >

[sage-support] Re: bug in comparison of function field elements

2014-04-29 Thread Simon King
Hi Volker, On 2014-04-29, Volker Braun wrote: > Always putting things in canonical form will be slow (there is no hook for > "you are about to be put into a set") Yes there is! The hook is the hash function. If you need a hash (i.e., if you put it into a set or dict) then you need a canonical f

[sage-support] Re: bug in comparison of function field elements

2014-04-29 Thread Simon King
Hi John, On 2014-04-29, John Cremona wrote: > That is a *very* unsatisfactory explanation for anyone actually > wanting to use Sage to do mathematics. +1 > That > function could easily be amended to do the second step, which would > make it more useful. ... and it should be used in the hash m

[sage-support] Re: bug in comparison of function field elements

2014-04-29 Thread Simon King
Hi John, On 2014-04-29, John Cremona wrote: > sage: s==t > True > sage: Set([s,t]) > {(27*u^2 + 81*u + 243)/(27*u - 81), (u^2 + 3*u + 9)/(u - 3)} Internally, a set would first distribute the given elements in "hash buckets". Elements in different hash buckets will not be compared by "==". And he

[sage-support] Re: How to see (1,1,1,1) as an element of Z/3Z x Z/2Z x Z/2Z x Z/2Z ?

2014-04-28 Thread Simon King
Hi! On 2014-04-28, Nathann Cohen wrote: >> The default repr is in terms of smith form gens, so IMHO it makes more sense >> to default to a linear combination of smith form gens. Imagine some method >> returns an abelian group, how are you going to construct elements? > > Well, obviously by changi

[sage-support] Re: Installing Python module in Sage (Ubuntu)

2014-04-24 Thread Simon King
Hi! On 2014-04-24, v...@ukr.net wrote: > I usually install the additional python packages this way: > > 1. wget 'http://python_package.tar.gz' > 2. tar xvf python_package.tar.gz > 3. cd python_package > 4. sage -python setup.py install > > Is this a correct method? Should work too, AFAIK.

[sage-support] Re: Substitution in infinite polynomial rings

2014-04-22 Thread Simon King
Hi Bruno, I am sorry that I (as author of the InfinitePolynomialRing stuff) did not answer before. On 2014-04-16, BJ wrote: > The output looks something like this: > > [-e_8 + e_4^2, -e_10 + e_6*e_4, -1382*e_12 + 2205*e_8*e_4 + 500*e_6^2 - >> 1323*e_4^3, -10*e_14 + 21*e_10*e_4 + 22*e_8*e_6 - 33*

[sage-support] Re: Given a set of generators for a group G, how do I find a presentation for it using those generators?

2014-04-04 Thread Simon King
Hi David, On 2014-04-04, David Joyner wrote: > On Fri, Apr 4, 2014 at 12:43 AM, Will wrote: >> Suppose I have a group G, which I know is finitely presentable and infinite. >> >> Suppose I have a small list of generators for G (in this case, 5). How can I >> find a presentation for G using those

[sage-support] Re: sage crash when too much recursion

2014-04-03 Thread Simon King
Hi Paul, On 2014-04-02, Paul Mercat wrote: > sys.setrecursionlimit(10) > def rec(niter): > rec(niter-1) > rec(niter-1) > rec(100) > > I would be very pleased if somebody knows how to fix this bug. See http://en.wikipedia.org/wiki/Recursion_%28computer_science%29 You can not expect a

[sage-support] Re: extension de corps

2014-03-20 Thread Simon King
Hi John, On 2014-03-20, John Cremona wrote: > You are going to have to make your question more specific: which > field are you starting from and wgat kind of extension are you trying > ot make? +1 > Which version of Sage are you using? Sure not version 3, > since the current one is version 6.

[sage-support] Re: Optimizing this function with Cython

2014-03-13 Thread Simon King
Hi! On 2014-03-12, geo909 wrote: > But I'm still not sure how to use things properly. So, for instance, is the > following optimization reasonable? > (there is an ~30% increase in speed from pure python code) It is easy to get more. But first: Is there a bug in your code? You write if

[sage-support] Re: Different behaviour of "sage -gap" and "gap pexpect interface"

2014-03-04 Thread Simon King
Hi Volker, On 2014-03-04, Volker Braun wrote: > --=_Part_318_11599549.1393944350520 > Content-Type: text/plain; charset=UTF-8 > > Did you rebuild the cached workspace? I.e. "rm -rf ~/.sage/gap". If you > manually install a package in GAP then we can't know that a package was > added... Yes

[sage-support] Re: Different behaviour of "sage -gap" and "gap pexpect interface"

2014-03-03 Thread Simon King
Hi! A partial reply to my own question: On 2014-03-03, Simon King wrote: > Doing the same in the pexpect interface, I get > sage: gap.RequirePackage('"ModIsom"') > Traceback (most recent call last): > ... > RuntimeError: Gap produced error output >

[sage-support] Different behaviour of "sage -gap" and "gap pexpect interface"

2014-03-03 Thread Simon King
Hi! I thought that sage's pexpect interface to GAP just launches "sage -gap" and then sends strings that are evaluated in the subprocess. Hence, I am very surprised by the following. I have installed GAP's ModIsom package, and in "sage -gap" I see that it really is available: gap> RequirePackag

[sage-support] Re: How to cancel a pending alarm() ? (Why did you kill alarm(0)?)

2014-01-27 Thread Simon King
Hi John, On 2014-01-27, John H Palmieri wrote: > Second, the old alarm code happened to work the way you wanted, but it > wasn't documented that way, and it's not clear (to me, at least) that that > use was ever intended. Had it been documented, or had it been commonly > known that alarm(0) wa

[sage-support] Re: While computing Smith normal form, I got bitten

2014-01-24 Thread Simon King
Hi Saul, On 2014-01-24, Saul Schleimer wrote: > Nice to hear from you. This discussion of morphisms is pretty > convincing. I tried it out, but I think I am doing something wrong. > > ... > > sage: A = Mat.get_action(Mat, operator.inv); A > sage: A.codomain() > -

[sage-support] Re: While computing Smith normal form, I got bitten

2014-01-24 Thread Simon King
Hi Saul, On 2014-01-23, Saul Schleimer wrote: > It seems to me that this violates the principle of "least surprise": if I > have a unit in a ring, and I invert it, I can reasonably expect answer to > be a unit, in that ring... Yes and no. If you have an integral domain, you can reasonably e

[sage-support] Re: Fwd: factoring polynomials modulo primes in Mathematica/Sage?

2014-01-15 Thread Simon King
Hi John, On 2014-01-15, John Cremona wrote: > and now you can do > > sage: mpoly.change_ring(GF(7)).factor() > (x + 1) * (x + 6) * (x^15 + x^14 + 3*x^13 + 2*x^12 + 6*x^11 + 5*x^10 + > 2*x^9 + 6*x^7 + 6*x^6 + 5*x^5 + 5*x^4 + x^2 + 2*x + 6) And what would one do if one is really interested to fact

[sage-support] Re: cpu time

2013-12-21 Thread Simon King
Hi Kannappan, On 2013-12-21, Kannappan Sampath wrote: > I'd like to know how to get some idea on the runtime of a certain program. > In particular, I'd like to know the following: > > how to run the program for various values of input, say parametrised by the > set of positive integers and extrac

[sage-support] Re: Compile sage/python script to a LINUX (not windows!) executable - or port to magma/gap.

2013-12-17 Thread Simon King
Hi Daniel, On 2013-12-16, Daniel Sheffield wrote: > My question is this: despite the latter point, does the fact that I need only > a linux executable (rather than a windows exe) help in any way? > The reason I need to do this is that need to run a sage/python script on the > university lab mac

[sage-support] Re: performance of applying a map to an integer vector

2013-11-20 Thread Simon King
Hi Felix, On 2013-11-20, Felix Breuer wrote: > If I am reading this correctly, this means that most of the time (~10 > seconds) is not spent doing the actual computation (using foo and bar) but > simply creating vectors and read/writing values to/from vectors (in > apply_map). (Do something li

[sage-support] Re: Possible memory leak involving IntegerModRing()

2013-11-16 Thread Simon King
Hi! On 2013-11-16, Simon King wrote: > For your information: This bug is tracked at > http://trac.sagemath.org/ticket/15424 I did not run the full doc tests yet, but I think I have fixed the leak. If you like to test it: I think you don't need a trac account to test the fix that I

[sage-support] Re: Possible memory leak involving IntegerModRing()

2013-11-16 Thread Simon King
Hi! Am Freitag, 15. November 2013 16:22:42 UTC+1 schrieb Simon King: > > > if K(2)**(n-1)== 2 *K.one(): #leaks > > For your information: This bug is tracked at http://trac.sagemath.org/ticket/15424 I have tested whether other trac tickets related with memory leaks would fix you

[sage-support] Re: Possible memory leak involving IntegerModRing()

2013-11-15 Thread Simon King
Hi Georgi, On 2013-11-15, Georgi Guninski wrote: > Note that modification of your workaround still > leaks (probably this known/the same): > > if K(2)**(n-1)== 2 *K.one(): #leaks Yes, it is the same underlying problem: If you want to multiply the integer "2" with the element K.one() of K, then S

[sage-support] Re: Possible memory leak involving IntegerModRing()

2013-11-15 Thread Simon King
Hi Georgi, On 2013-11-15, Georgi Guninski wrote: > Everyone knows sage has no bugs. OMG, this means I lost my main occupation! > Appears to me the following program should use > O(1) memory. > > Watching memory usage in top(1), the proggie uses > 3GB ram in less than a minute and memory usage >

[sage-support] Re: Quotient of free algebra on 2 generators (x, y) over rational field by a non-homogenous ideal

2013-10-10 Thread Simon King
Hi! Am Mittwoch, 9. Oktober 2013 00:18:21 UTC+2 schrieb Abdolrasool Bahari-fard: > > Here I asked a question in sage but there is an error which I can not > solve it: > > F.=FreeAlgebra(QQ) > I=F*[x*y*x*y-y*x, y*x*y*x-x*y]*F > G.=F.quo(I) > > > Typ

[sage-support] Re: Non-homogenous Ideals In Unital Associative Free Algebras

2013-10-10 Thread Simon King
Hi! Am Dienstag, 8. Oktober 2013 18:04:22 UTC+2 schrieb Abdolrasool Bahari-fard: > > want to define a two sided ideal I=[x*y*x*y-x*y, y*x*y*x-x*y*x] in an > unital associative free algebra F.. (not just in a free algebra) > > I wrote in sage: > > F.=FreeAlgebra(QQ, implementation='letterplace')

[sage-support] Re: How to build documentation for separate files?

2013-08-14 Thread Simon King
Hi Volker, On 2013-08-14, Volker Braun wrote: > --=_Part_213_17258047.1376494288142 > Content-Type: text/plain; charset=ISO-8859-1 > > Afaik there is no simple one-command solution. But its relatively easy to > take the Sage docbuilder minus the parallelism stuff and just process your > own

[sage-support] Re: Speeding up multiplication in a free algebra.

2013-07-19 Thread Simon King
Hi! On 2013-07-14, broken_symlink wrote: > I have something that is passing the tests. I thought I would be able to do > better by getting rid of the two for loops and using list comprehensions. > But, according to kernprof all I managed to do was make things worse. Anyway, if at some point y

[sage-support] Re: Speeding up multiplication in a free algebra.

2013-07-14 Thread Simon King
Hi! On 2013-07-14, broken_symlink wrote: > Is the code it uses for multiplication in free_algebra_element.py under > devel/sage/sage/algebras? If so, I'm pretty sure for multiplication at > least it should be possible to do better. Is there a way I can mess around > with the _mul_ function eas

[sage-support] Re: Speeding up multiplication in a free algebra.

2013-07-10 Thread Simon King
PS: On 2013-07-10, Simon King wrote: > One remark: > > In your code, you construct an algebra element by > FreeAlgebraElement(self.alg, k) > Please don't do this! > In general, elements of an algebraic structure "A" given by data "d" should be > c

[sage-support] Re: Speeding up multiplication in a free algebra.

2013-07-10 Thread Simon King
Hi, On 2013-07-10, broken_symlink wrote: > I've done some profiling of my code and it seems that my main slowdowns are > coming from multiplication and addition of free algebra elements. > Is there > anyway I can make it go faster? You define self.alg = FreeAlgebra(self.br, len(g.split(',')

[sage-support] Re: how to keep up to a certain degree of a multivariate polynomial?

2013-06-03 Thread Simon King
Hi! On 2013-06-04, Sam math wrote: > How do I do this for a multivariate polynomial? It says O(.) is not defined... > > R. = PolynomialRing(QQ) > > f = x^3*y^3 + x^2 * y^4 + x*y + x + y + 1 > > How can I chop this polynomial up to a certain degree of x and y? I.e. I want > to keep up until the s

[sage-support] Re: Submodules of QQ['x,y,z'] as module over itself

2013-05-31 Thread Simon King
Hi Johannes, On 2013-05-31, Johhannes wrote: > yea, that helped a lot. I just started to figure out where the FreeModule > implementation violates the categories model. Do you mean the code in sage.combinat.free_module.CombinatorialFreeModule? Sure, this complies with the category and coercion

[sage-support] Re: Who to cite?

2013-05-30 Thread Simon King
Hi Diana, On 2013-05-30, d.tran wrote: > I need to know which softwares/authors to cite in writing my manuscript. I > use the sage function to solve multi-variable systems of nonlinear > inequalities. You may try to use sage.misc.citation.get_systems. For example: sage: vars = var('g_1 g_2

[sage-support] Re: Submodules of QQ['x,y,z'] as module over itself

2013-05-24 Thread Simon King
Hi Johannes, On 2013-05-24, Johannes wrote: > I'm don't have a a good understanding of the sage category system, but > if somebody could give me an introduction or link, I'll have a deeper > look at it. There is a thematic tutorial found at SAGE_ROOT/devel/sage/doc/output/html/en/thematic_tuto

[sage-support] Re: Submodules of QQ['x,y,z'] as module over itself

2013-05-24 Thread Simon King
Hi Johannes, On 2013-05-22, Johannes wrote: > is it implemented to create submodules of QQ['x,y,z'] as module over > itself? In other words, you have an ideal, and it acts on itself by multiplication and addition. > I know it works for QQ['x'] or ZZ. How? Ideals are not even properly implemen

[sage-support] Re: Coefficients of polynomial over finite field are not reduced?

2013-05-05 Thread Simon King
Hi, On 2013-05-05, William Stein wrote: >> F =3D GF(3) >> R. =3D F[] >> T(x)=3D5*x^2+3 > > This is wrong. Do T=3D5*x^2+3 instead. To elaborate a bit more: By T(x) = 3*x^2+3 you define T as a symbolic function (not as a polynomial) in the new symbolic variable x. Hence, after this line, x is

[sage-support] Re: why this command doesn't work?

2013-04-29 Thread Simon King
Hi Neda, On 2013-04-29, Neda wrote: > I want to compute S(f,g) , but this command doesn't work and it said there > is no spol command, could you please tell me how can I compute it? > R.=PolynomialRing(QQ,3,'lex') > f=4*x^2*z-7*y^2 > g=x*y*z^2+3*x*z^4 > spol(f,g) spol is a function defined in t

[sage-support] Re: Group action

2013-04-19 Thread Simon King
Hi Johannes, On 2013-04-18, Johannes wrote: > Hi guys, > > I have the following setting: Given a finite subgroup G of GL_\C(n) of > order k, acting on C[x_1,...,x_n] by multiplication with (potenz of a ) > k-th root of unity. What is the best way, to translate this setting to sage? > In the end I

[sage-support] Re: Polynomial quotient and reminder

2013-04-17 Thread Simon King
Hi Andrea, On 2013-04-17, Andrea Lazzarotto wrote: >> Note that by saying >> S(x) = ... >> you define S as a symbolic function on a symbolic variable x, and if you >> re-define x later, then the variable of S will still be symbolic, and >> not belong to a polynomial ring. >> > > Ok, my bad

[sage-support] Re: Polynomial quotient and reminder

2013-04-17 Thread Simon King
Hi Andrea, On 2013-04-17, Andrea Lazzarotto wrote: > Hi, I am trying to work with polynomials in Finite Fields. We have to > implement the Extended Euclidean Algorithm for using it with Reed Solomon > Codes. > ... > Now my problem is that I would like to divide a by b and get bot the quotient

[sage-support] Re: extract terms and their coefficients from an expression

2013-03-31 Thread Simon King
Hi! On 2013-03-31, Dima Pasechnik wrote: > On 2013-03-30, tvn wrote: >> --=_Part_1723_8861826.1364684060099 >> Content-Type: text/plain; charset=ISO-8859-1 >> >> In sympy there's a method call as_coeffficients_dict() that returns all >> the terms and their coefficients from an expression.

[sage-support] Re: Converting an integer to a given base

2013-03-16 Thread Simon King
Hi Pascal, On 2013-03-16, pascal wrote: > How to perform base conversion with Sage ? Remember that Python has limited > capability to convert to an arbitrary base. For instance, Python, by > default, doesn't allow to convert to base 6. According to > > https://groups.google.com/forum/?hl=fr&fr

[sage-support] Re: Random Permutation

2013-03-04 Thread Simon King
Hi Gary, On 2013-03-04, GaryMak wrote: >> sage: Permutations(50).random_element() >> [11, 4, 30, 48, 49, 36, 22, 16, 27, 6, 44, 33, 13, 50, 9, 35, 15, 12, >> 26, 45, 1, 18, 2, 40, 19, 10, 28, 7, 37, 46, 25, 29, 34, 41, 38, 24, 8, >> 20, 32, 21, 14, 23, 31, 47, 43, 17, 3, 39, 5, 42] > > I have a

[sage-support] Re: Memory usage

2013-02-18 Thread Simon King
Hi, On 2013-02-18, switzel wrote: > so I could do something like > > import gc > i=i+1 > if (i%1==0): > if get_memory_usage()>3000: > gc.collect() > > but shouldn't there be a more "automatic" way? Thanks! Garbage collection *is* automatic, and there is no need to call it manuall

[sage-support] Re: How to refer to the reference manual when writing a tutorial?

2013-02-08 Thread Simon King
Hi John, hi Jeroen, On 2013-02-08, John H Palmieri wrote: > On Friday, February 8, 2013 11:25:15 AM UTC-8, Jeroen Demeyer wrote: >> >> Maybe #6495 would make this possible? Just a guess. >> > > Yes, I just check this. With #6495 in place, I added this to some random > file in the developer's gu

[sage-support] Re: How to refer to the reference manual when writing a tutorial?

2013-02-08 Thread Simon King
Hi Karl-Dieter, On 2013-02-08, kcrisman wrote: >> Is it possible to get such cross-document link? How? > > I don't think we support that currently. Would it be difficult to implement? Sorry, I am no sphinx expert. Cheers, Simon -- You received this message because you are subscribed to the

[sage-support] How to refer to the reference manual when writing a tutorial?

2013-02-08 Thread Simon King
Hi! I'm writing a thematic tutorial on coercion and category framework. In some cases, I wish to have links to pages in the reference manual, such as :class:`sage.structure.parent.Parent`. But since the thematic tutorials and the reference manual are separate documents, it doesn't work so easily.

[sage-support] Re: Adomian polynomials

2013-02-07 Thread Simon King
Hi! On 2013-02-07, Olajumoke Yetunde Fashomi wrote: > Thanks for your concern, F is a function of y which are the non-linear > terms in the second order initial value problem. The purpose of the y[n] is > to generate a recursive relation for the polynomials I think John was not asking how F is d

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Simon King
Hi, On 2013-01-21, Volker Braun wrote: > --=_Part_128_10880395.1358779116647 > Content-Type: text/plain; charset=ISO-8859-1 > > Input really must be positive definite, not just definite with any sign. OK, then we should at least fix the documentation of LLL_gram. Cheers, Simon -- You rece

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Simon King
Hi Volker, On 2013-01-21, Volker Braun wrote: > LLL_gram() is a good deal faster than checking positive definiteness: Sorry, your post came while I wrote my post. If checking positive definiteness can be a bottle neck then my suggestion to test it by default is not good. > I guess this means th

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Simon King
Hi y'all, On 2013-01-21, Volker Braun wrote: > This uses Pari lllgramint(), which assumes that the matrix is positive > definite. If the matrix is not positive definite, Pari may not return. > > sage: D.is_positive_definite() > False Then we have at least a bug in the documentation. Namely, it

[sage-support] Re: M.LLL_gram()

2013-01-21 Thread Simon King
Hi Sage supporters, bump! Is there really no answer to Ian Hambleton's question that he asked a month ago? Can it really be so difficult to do LLL_gram on a 6x6 integer matrix? Cheers, Simon Am Donnerstag, 20. Dezember 2012 00:07:03 UTC+1 schrieb William: > > I'm forwarding this to sage-suppo

[sage-support] Re: sage crashes on this input

2013-01-14 Thread Simon King
Hi Michael, On 2013-01-14, Michael Beeson wrote: > --=_Part_111_11990633.1358202706289 > Content-Type: text/plain; charset=ISO-8859-1 > > sage: K. = FractionField(PolynomialRing(QQ,4,'pdeN')) > sage: R. = K[] > sage: a = x^3-x^-3 > sage: b = x^5-x^-5 > sage: c = x^8-x^-8 Are you aware that

[sage-support] Re: avoid loading notebook

2013-01-11 Thread Simon King
Hi Johannes, On 2013-01-11, Johhannes wrote: > --=_Part_604_3093942.1357902134175 > Content-Type: text/plain; charset=ISO-8859-1 > > Hi list, > the only way I'm using sage is in emacs or from the command line. Is there > a possibility to avoid loading the notebook stuff on startup, because I

[sage-support] Re: Symbolic functions (?) problems

2012-12-22 Thread Simon King
Hi Emmanuel, On 2012-12-22, Emmanuel Charpentier wrote: >> You mean: *python's* add was designed in that way.=20 >> > > OK. That does not change much my reasoning, as far as I know|understand.=20 IMHO, it changes a lot. See below. >> * Comparison of symbolic expressions by <, > or cmp really d

[sage-support] Re: Symbolic functions (?) problems

2012-12-22 Thread Simon King
Hi Emmanuel, On 2012-12-22, Emmanuel Charpentier wrote: > So, if I follow you, Sage's add was designed from the start to be=20 > overloaded by class methods, You mean: *python's* add was designed in that way. > As for the performance : class matching and method dispatching would occur= > every

[sage-support] Re: Symbolic functions (?) problems

2012-12-21 Thread Simon King
Hi! On 2012-12-21, Emmanuel Charpentier wrote: > But why do we have to use max_symbolic ? As far as I can tell, max, like=20 > many other functions in Sage, could be overloaded to call max_symbolic when= > used with a symbolic argument, no ? After all, we don't have to write=20 > plus_symbolic(a,

[sage-support] Re: Groebner Basis over finite field

2012-12-12 Thread Simon King
Hi! On 2012-12-13, Santanu Sarkar wrote: > When I want to calculate > Groebner basis, I have following error. > > > verbose 0 (3292: multi_polynomial_ideal.py, groebner_basis) Warning: > falling back to very slow toy implementation. This is not an error but a warning. > P1=next_prime(2^100) > R

[sage-support] Re: Logical connective "or"

2012-12-07 Thread Simon King
Hi Volker, On 2012-12-07, Volker Braun wrote: > --=_Part_251_18870492.1354891149790 > Content-Type: text/plain; charset=ISO-8859-1 > > "or" is just the normal Python boolean operation. But then: How can one combine symbolic expressions without automatic evaluation? Best regards, Simon --

[sage-support] Re: Floating point exception when factoring over QQ['x,y']

2012-11-28 Thread Simon King
Hi Georgi, On 2012-11-28, Georgi Guninski wrote: > Probably the problem is in Singular. Probably not. If I am not mistaken, Singular is involved in polynomial factorisation over *finite* fields. > There are at least 3 "issues" with Singular i reported, won't someone > contact them? They were c

[sage-support] Re: How do you stop sage in the middle of a block?

2012-11-20 Thread Simon King
Hi! On 2012-11-20, LFS wrote: > --=_Part_363_10202299.1353441032364 > Content-Type: text/plain; charset=ISO-8859-1 > > Thank-you both! > The 'break' did what I wanted for now and will test os._exit() in a bit. > Really appreciate your help. PS: Sage's user language is Python (plus some prep

[sage-support] Re: Is google groups buggy? Test posting

2012-09-13 Thread Simon King
Hi Moritz, On 2012-09-13, moritz wrote: > --=_Part_3962_6668500.1347522292802 > Content-Type: text/plain; charset=ISO-8859-1 > The message did not appear on sage-support if one views it on google > groups, and still can't be seen. I agree that the new google groups are buggy, I believe tha

[sage-support] Re: Matrix

2012-08-06 Thread Simon King
Hi! On 2012-08-06, Jan Groenewald wrote: > --f46d0421824d14212e04c6996193 > Content-Type: text/plain; charset=ISO-8859-1 > > Hi > > On 6 August 2012 13:45, Dima Pasechnik wrote: > >> works for me on Sage 5.2: >> >> sage: matrix(ZZ,2,2,[1,2,3,4]) >> [1 2] >> [3 4] >> >> Please upgrade, Sage 4.8 i

[sage-support] Re: Fraction Fields coefficients

2012-07-02 Thread Simon King
Hi Juan, On 2012-07-01, Juan Grados wrote: > --bcaec54d47685faa4404c3c7ef8c > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > > Hi Robert, thanks by your response, but i get the same error > > AttributeError: 'FractionFieldElement_1poly_field' object h

[sage-support] Re: Fwd: Sage Math and Accessibility

2012-06-14 Thread Simon King
Hi William, On 2012-06-14, William Stein wrote: > ...  He is considering using SAGE for student > assignments and I was wondering if SAGE is accessible for the visually > impaired?  Specifically, does it work with a screen reader? Isn't the Sage command line version, being based on pure text, ea

[sage-support] Re: docstring of scipy.stats.expon

2012-06-13 Thread Simon King
Hi Laurent, On 2012-06-13, Laurent wrote: > Among other it contains : > > expon.pdf(x) = exp(-x) for x >= 0. > scale = 1.0 / lambda > > While the *true* text is > > expon.pdf(x) = lambda * exp(- lambda*x) The problem appears in Python's inspect module as well. Do sage: from scipy import

[sage-support] Re: user interface

2012-06-09 Thread Simon King
Hi Chris, On 2012-06-08, Chris Hall wrote: > --=_Part_17_4419140.1339191929831 > Content-Type: text/plain; charset=ISO-8859-1 > > I know this is a broad question. What are the existing 'serious' > alternates to the 'usual' browser-based interface to sage? For me, the "usual" interface is t

[sage-support] Re: Methods in GF

2012-05-29 Thread Simon King
Hi, On 2012-05-29, Martin Albrecht wrote: >> sage: k.some_elements ? >> ... >>Returns a collection of elements of this finite field *for use >> in unit testing.* > > The function is indeed used in unitests as confirmed by > search_src("some_elements"). Perhaps it should start with an un

[sage-support] Re: Google Chrome keeps saying "Page contains unsafe content"

2012-05-28 Thread Simon King
Back on topic: Does *Google* Chrome generally complains about unsafe content in new *google* groups (would be astonishing)? Are the other sage related groups fine (which are still using the old google groups)? Is sage-support the first and only new google group for which you experience trouble with

[sage-support] Re: Google Chrome keeps saying "Page contains unsafe content"

2012-05-28 Thread Simon King
Hi Keshav, On 2012-05-28, Keshav Kini wrote: > Simon King writes: >> Well, I read it using slrn, and news.gmane.org is the only collection of >> news groups I am visiting. In slrn, it appears as >> gwene.comp.mathematics.sage.release. >> The grain of salt: The

[sage-support] Re: Google Chrome keeps saying "Page contains unsafe content"

2012-05-28 Thread Simon King
Hi Keshav, On 2012-05-28, Keshav Kini wrote: > Simon King writes: > Wait, sage-release is on Gmane? Are you sure? I don't see it in the > group listing. Well, I read it using slrn, and news.gmane.org is the only collection of news groups I am visiting. In slrn,

[sage-support] Re: Google Chrome keeps saying "Page contains unsafe content"

2012-05-28 Thread Simon King
Hi Roland, On 2012-05-28, Rolandb wrote: > --=_Part_1326_3042169.1338231507301 > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, this applies to > https://groups.google.com/forum/?fromgroups#!forum/sage-support > > Maybe someone knows a way to stop this message... Does the same also ha

[sage-support] Re: run sage directly from terminal

2012-05-22 Thread Simon King
Dear Arshpreet, On 2012-05-18, arshpreet singh wrote: >> If you want a system wide installation, make the symbolic link in >> /usr/local/bin, i.e. "cd /usr/local/bin" and "ln -s >> /directory/to/sage-installation/sage sage". Then you can start sage by just >> typing "sage" anywhere. > Thanks it w

[sage-support] Re: Use lazy_attribute in cython?

2012-05-01 Thread Simon King
Hi! On 2012-05-02, P Purkayastha wrote: > --=_Part_843_14196874.1335939956360 > Content-Type: text/plain; charset=ISO-8859-1 > > Is there a way to use lazy_attribute in cython code? lazy_attribute requires that the object allows attributes to be set. Thus, it works if you have a non-cdef cla

[sage-support] Re: qd library in Sage

2012-03-29 Thread Simon King
Hi William, On 2012-03-29, William Stein wrote: > On Thu, Mar 29, 2012 at 10:35 AM, rych wrote: >> Is the quad precision qd library >> (http://crd-legacy.lbl.gov/~dhbailey/mpdist/) included in Sage? > > No, though it once was long ago. We removed it due to quality and > redundancy issues. If i

[sage-support] Re: Double indexed variables

2012-03-29 Thread Simon King
Hi Adam, On 2012-03-28, Adam Sorkin wrote: > --=_Part_852_32340732.1332963705957 > Content-Type: text/plain; charset=ISO-8859-1 > > This works fine when the variable is of type > sage.symbolic.expression.Expression > but when I make the polynomial ring PolynomialRing(QQ, a), it breaks. I ag

[sage-support] Re: Problem signing out fully from sage-4.8

2012-03-27 Thread Simon King
On 2012-03-27, P Purkayastha wrote: > --=_Part_514_22967271.1332825281139 > Content-Type: text/plain; charset=ISO-8859-1 > > Just type Ctrl-C and that will stop the server. I guess it is documented somewhere. But I think it would be nice if when starting the notebook one would not only read

[sage-support] Re: infinite dictionary

2012-03-21 Thread Simon King
Hi Daniel, On 2012-03-21, Daniel Krenn wrote: > --=_Part_398_30308910.1332361702523 > Content-Type: text/plain; charset=ISO-8859-1 > > Is there something like an "infinite dictionary" in Sage/Python? > > More precisely, is there something where > - i can put in values like in a dictionary,

[sage-support] Re: Jmol applets

2012-03-21 Thread Simon King
Hi Jan, Am Dienstag, 20. März 2012 20:30:15 UTC+1 schrieb Simon King: > > Jan Groenewald aims.ac.za> writes: > > In short, random, bad results. I guess we need some better test cases for > this? > > And I think you need to run it several times, evaluating, closeing an

<    1   2   3   4   5   6   7   8   9   10   >