[sage-support] Re: How to prevent a browser from opening after starting a Sage notebook server

2017-12-13 Thread Simon King
Hi, On 2017-12-14, Kwankyu wrote: > "sage -n" automatically opens a new browser window after starting the > notebook server. I checked this on Mac and Ubuntu. I think this is an > "over" service, and annoyance if I do not want a new browser window, unless > there is a

[sage-support] Re: Map from S.base() to S?

2017-11-27 Thread Simon King
Hi Jeroen, On 2017-11-27, Jeroen Demeyer wrote: > I might be missing something, but is there a generic recipe in Sage to > get a map from S.base() to S? I want something which works in as much > generality as possible for any structure S. I feel like that should >

[sage-support] Re: commend to get eigen values for matrix

2017-11-17 Thread Simon King
On 2017-11-17, rajni goyal wrote: > I want to know commend to get eigen values Aparently you don't know how to use SageMath's search tools. So I'll start by that. 1. There is a searchable documentation for SageMath. It is very easy to find examples for eigen value

[sage-support] Re: Sage Crash Report

2017-10-23 Thread Simon King
Hi Dima, On 2017-10-23, Dima Pasechnik wrote: >> ... which means that we should enhance our crash message (if there is any; >> I don't recall what I saw when Sage last crashed for me). >> > if you like to refresh your experience, you might try various 2-liners from >

[sage-support] Re: Sage Crash Report

2017-10-23 Thread Simon King
On 2017-10-23, Jeroen Demeyer wrote: > On 2017-10-22 21:01, Jan Groenewald wrote: >> If you can email this file to the developers > ...provided with information on how you installed Sage, what OS you are > using, which version of Sage you are running, what command you ran

[sage-support] Re: How to find solution

2017-10-15 Thread Simon King
On 2017-10-14, Simon King <simon.k...@uni-jena.de> wrote: > First, define a variable `a`. I don't know if one really needs > to declare its domain to solve the problem, but when one does, > the computation works: One doesn't need to. var('a') is just fine. -- You received this

[sage-support] Re: How to find solution

2017-10-14 Thread Simon King
Hi! On 2017-10-14, Santanu Sarkar wrote: > In Sage, is it possible to find a such that > > \int_{a}^{\infty} e^(-x^2/2) dx=2^(-20) Yes. Probably you want to see how. First, define a variable `a`. I don't know if one really needs to declare its domain to solve

[sage-support] Re: installing cantera with sage

2017-10-14 Thread Simon King
Hi Paul, disclaimer: I didn't try to install Cantera. But generally, to install Python packages that are not part of the SageMath ecosystem, you should first open a Sage shell by the command sage -sh Then, in the Sage shell, you follow the instructions to install the package. Sage has its

[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Simon King
On 2017-09-19, Simon King <simon.k...@uni-jena.de> wrote: > Since you explicitly ask about a factorisation of the form > (1 + a*s + b*s^2)*(1 + c*s): Sorry, I was stupid: Your polynomial is of degree 3 in s. Thus, if a factorisation exists, then it is of the above form. Anyway: Fr

[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Simon King
Hi Yann, On 2017-09-19, Yann Cargouet wrote: > Here is the text of the expression: > Cc*Cin*Cl*Rc*Rl*Rs*s^3 + Cc*Cl*Rc*Rl*s^2 + Cc*Cin*Rc*Rs*s^2 + > Cc*Cin*Rl*Rs*s^2 + Cc*Cl*Rl*Rs*s^2 + Cin*Cl*Rl*Rs*s^2 + Cc*Rl*Rs*gm*s + > Cc*Rc*s + Cc*Rl*s + Cl*Rl*s + Cc*Rs*s + Cin*Rs*s +

[sage-support] Re: Conversion of libgap data to sage data

2017-09-16 Thread Simon King
On 2017-09-16, Simon King <simon.k...@uni-jena.de> wrote: > What to do? As sage_eval sucks, I should probably just try to > write the code into a (python) file and use sage.repl.load.load. No, it is as bad as sage_eval, i.e., makes my laptop use swap very quickly. -- You received

[sage-support] Re: Conversion of libgap data to sage data

2017-09-16 Thread Simon King
On 2017-09-16, Simon King <simon.k...@uni-jena.de> wrote: > I thought I was told about faster matrices by my former boss, David > Green, but by searching my mails I found that I was pointed to > ImmutableMatrix by Dima Pasechnik. > > Let's see if that's fast enough...

[sage-support] Re: Conversion of libgap data to sage data

2017-09-16 Thread Simon King
On 2017-09-16, Simon King <simon.k...@uni-jena.de> wrote: > An ideal solution for me would be either of the following: > - A way to make libgap use a matrix implementation that is as fast > as Sage matrices and is certainly a lot faster than treating > matrices as lists of

[sage-support] Re: Conversion of libgap data to sage data

2017-09-16 Thread Simon King
Hi Nils, On 2017-09-15, Nils Bruin wrote: > How fast is converting your list of matrices to a list of lists in gap? > Perhaps GapMatrix->GapList->SageList->SageMatrix is faster. If I understand correctly, what libgap uses *are* lists. But apparently gap treats lists of lists as

[sage-support] Conversion of libgap data to sage data

2017-09-15 Thread Simon King
Hi! I have some files providing GAP readable data, i.e., libgap.Read(source) works. The data consist of a rec(...) (roughly corresponding to a Python dict), where some of the values are lists of strings and other simple things, some are lists of lists of finite field elements, some are other

[sage-support] Re: Symbolic computation: ECLS error: No such file or directory

2017-08-30 Thread Simon King
Hi Dima, On 2017-08-30, Dima Pasechnik wrote: > Here is something reproducible (on FreeBSD): > > Start Sage, type > > sage: from sage.interfaces.maxima_lib import max > > and hit Tab. > > This immediately dumps core: With sage-8.1.beta3 on Ubuntu 16.04.2 LTS, the above

[sage-support] Re: simple definition

2017-08-27 Thread Simon King
PS: On 2017-08-27, Simon King <simon.k...@uni-jena.de> wrote: > So, what exactly is happening here? Two symbolic variables are > created, and a symbolic function is created, whose definition > on the *result* of evaluating f(a)+sl(a)*(x-a). I omitted a word: "... whose

[sage-support] Re: simple definition

2017-08-27 Thread Simon King
Hi Valerio, On 2017-08-27, valerio...@gmail.com wrote: > L(a,x)=f(a)+sl(a)*(x-a) > > L(1,x) > ValueError: power::eval(): division by zero The above syntax, as innocent as it looks, implies a lot of things, via Sage's preparser: sage: preparse("L(a,x) =

[sage-support] Re: numerical semigroup in sagemath

2017-07-25 Thread Simon King
Hi! On 2017-07-25, springfield .gion wrote: > Hi, I need to create and manipulate the additive semigroups generated by > integers (such as those generated by tuples of coprime integers), but I am > struggling with the syntax; is there an easy way to create something

[sage-support] Re: How to write 10exp(-5) in SAGEMATH

2017-07-03 Thread Simon King
Hi! On 2017-07-03, Fjordforsk A/S wrote: > Hi, how does one write 10^(-8) ? > > Is it as the conventional way 10**(-8) or is it 10exp(-8) ? Sage is based on Python, thus, 10**(-8) definitely works. In addition, Sage uses a preparser to make the user interface still a

[sage-support] Re: Matrix of operations after gaussian elimination

2017-06-10 Thread Simon King
Hi Juan, On 2017-06-10, Juan Grados wrote: > Thank by I get > > ValueError: too many values to unpack > > I think because my matrix has entries in GF(2). You are right. According to the documentation: * "transformation" -- boolean. Whether to also return the

[sage-support] Re: Computing discrete logs in polynomial rings modulo another polynomial over non-prime-power

2017-04-09 Thread Simon King
Hi John, On 2017-04-09, John Cremona wrote: > Simon is right I am not so sure. It somehow seems to me that the OP's question is about polynomial rings. Yes, he uses finite fields in his example. But it seems that he wants to work with a quotient ring of the polynomial

[sage-support] Re: Computing discrete logs in polynomial rings modulo another polynomial over non-prime-power

2017-04-09 Thread Simon King
Hi Bill, On 2017-04-08, 'Bill Cox' via sage-support wrote: > I want to test finding the discrete log in the circle group over Z/Zm -- > discrete logs of g^a mod m, where g is a complex number and m is composite. > Can Sage do this for large composite m, say on

[sage-support] Re: Is this a bug in the FreeAlgebra Class?

2017-03-30 Thread Simon King
Hi Adam, On 2017-03-30, Adam Mullins wrote: > Shouldn't 0 in R return true as well? Does it not?? That should certainly work with the fix from the ticket that I mentioned. Best regards, Simon -- You received this message because you are subscribed to the Google

[sage-support] Re: Is this a bug in the FreeAlgebra Class?

2017-03-29 Thread Simon King
Hi! Am Mittwoch, 29. März 2017 14:14:28 UTC+2 schrieb Simon King: > > I will open a trac ticket for it. > I opened https://trac.sagemath.org/ticket/22707. With the branch from there (that hasn't been tested yet, so, handle with care!), one has sage: R.<x,y,z> = FreeAlgebra(In

[sage-support] Re: Is this a bug in the FreeAlgebra Class?

2017-03-29 Thread Simon King
Hi! On 2017-03-28, Adam Mullins wrote: > Hi, I create a free algebra like such: > > R. = FreeAlgebra(Integers(2)) > > When I try to check if the constant polynomial 1 is in R, it returns false. > But this should return true. > i.e. 1 in R returns false > > It

[sage-support] Re: Multivariate polynomial coefficients including zeros

2017-03-15 Thread Simon King
Hi Anastasia, On 2017-03-15, Anastasia Theodouli wrote: > I would like to get in a list *ONLY* the coefficients of the following > monomials of P (including zero coefficients in correct order) > > (x0^2, x0*x1, x1^2, x0*x2, x1*x2, x2^2, x0, x1, x2, 1) If you only

[sage-support] Re: Using Galois fields for less than 2^16, crashes and restarts Kernel

2017-03-14 Thread Simon King
Hi, On 2017-03-14, mahm.fa...@gmail.com wrote: > NameError: name 'GF' is not defined > > > So it seems it requires me to import something, I am confused ! > > At the moment I am downloading the tar file for my mac, I will try what you > wrote me there. It will take time

[sage-support] Re: Division in non-Integral domain

2017-02-25 Thread Simon King
Hi Santanu, I am sorry that your question was unanswered for so long. On 2017-02-24, Santanu Sarkar wrote: > How to check $x+4 \in <1+x+x^2+2x^3>$ in the ring $\mathbb{Z}_8[x]$, where ><1+x+x^2+2x^3> is the ideal generated by 1+x+x^2+2x^3? > If yes, how to find

[sage-support] Advices in "Git the Hard Way" don't work for me

2017-02-23 Thread Simon King
Hi! "Git the Hard Way" in the development manual tells me to do git clone git://github.com/sagemath/sage.git It doesn't work for me: ssh: Could not resolve hostname What can I do to solve the problem? Cheers, Simon -- You received this message because you are subscribed to the Google

[sage-support] Re: Ssh problems

2017-02-22 Thread Simon King
Hi Dima, On 2017-02-21, Dima Pasechnik wrote: > first of all, put your (new?) ssh key to trac, and also to github, if you > have an account there. For *cloning*? Sure, I need it for pushing. But I don't think I have ever made Sage aware of my github account (not sure if I

[sage-support] Re: Ssh problems

2017-02-22 Thread Simon King
Hi Eric, On 2017-02-21, Eric Gourgoulhon wrote: > What about > git clone https://github.com/sagemath/sage.git > (note the change "git:" --> "https:") > Does it work better for you ? Thank you! That seems to do the trick. So, should the development mantual be changed

[sage-support] Re: Ssh problems

2017-02-21 Thread Simon King
On 2017-02-21, Simon King <simon.k...@uni-jena.de> wrote: > So, please give me directions on how to close the git repositories I meant to write "clone", not "close"... -- You received this message because you are subscribed to the Google Groups "sage-s

[sage-support] Ssh problems

2017-02-21 Thread Simon King
Hi! Trying to follow the advices in "Git the Hard Way", I did git clone git://github.com/sagemath/sage.git However, I got the response ssh: Could not resolve hostname https: Name or service not known Is the problem on my side? Also I see that (unlike in the past) I could not do ssh

[sage-support] Re: how to do this in SAGE

2017-02-08 Thread Simon King
Hi! On 2017-02-08, valerio...@gmail.com wrote: > Is there a difference between > return expand(f^2) > and > return (g^2).expand() > or are they perfect synonyms? SageMath's language is Python, in particular it is object oriented. Personally, I'd always prefer calling a

[sage-support] Re: how to do this in SAGE

2017-02-07 Thread Simon King
Hi, On 2017-02-07, valerio...@gmail.com wrote: > I have not been able to use f as a parameter. To use a simpler example, > what is the SAGE code corresponding to this Mathematica code: > f[x_]:=1+x+x^2 > g[x_]:=1+x+x^2+x^3 > Ex[f_]:=Expand[f[x]^2] > Ex[f] > > 1 + 2 x + 3

[sage-support] Re: Conversion/pickling of libgap's polycyclic groups

2017-02-04 Thread Simon King
Hi Alexander, On 2017-02-04, Alexander Konovalov wrote: > Hi Simon, > > You can use CodePcGroup and PcGroupCode, see example below. > > Hope this helps > Alexander Great, thank you! Best regards, Simon -- You received this message because you are subscribed to

[sage-support] Conversion/pickling of libgap's polycyclic groups

2017-02-04 Thread Simon King
Hi! Suppose I have a polycyclic group G defined via libgap, that I originally obtained from the SmallGroups library. Now I want to pickle that group. Apparently, if I just store the address of G in the small group library, then I can reconstruct G from that. But of course I can not assume that

[sage-support] Re: Grobner bases of ideals

2016-12-22 Thread Simon King
On 2016-12-21, jack wrote: >> Try removing the semi-colon;;; No. I tried the example, using different term orders (the OP uses lex, I also tried degrevlex), but it didn't finish within 15 minutes. So, I'd say that simply the problem is very difficult. On the other

[sage-support] Re: Grobner bases in sage

2016-12-16 Thread Simon King
Hi Nitin, On 2016-12-16, NITIN DARKUNDE wrote: > Respected Sir, > I am talking about remainder of f. >> >> Are you talking about reduce? >> >> http://doc.sagemath.org/html/en/reference/polynomial_rings/ >>

[sage-support] Re: Grobner basis for linear codes

2016-12-07 Thread Simon King
Hi Nitin, On 2016-12-06, David Joyner wrote: >> code's) length, but while finding parity check matrix of this linear >> code(using command H=C.check_mat()), I am not getting the output or >> sometimes I get the output as string index out of range... Now that's strange. If

[sage-support] Re: Grobner basis for linear codes

2016-12-07 Thread Simon King
Hi, On 2016-12-06, David Joyner wrote: > On Tue, Dec 6, 2016 at 12:21 PM, NITIN DARKUNDE > wrote: >> Respected Sir, >> Yes sir, I am supposed to calculate Grobner basis for an >> ideal in a polynomial ring in 35 variables with

[sage-support] Re: Reduce all coefficients of multivariate polynomial to 1

2016-12-04 Thread Simon King
Hi, > sage: sum(P.monomials()) > x1^2 + x1*x2 + x2^2 + x1*x3 + x2*x3 + x3^2 + x1 + x2 + x3 + 1 Sorry, aparently I didn't carefully read the problem: Whe you gave the example with X = Y, I thought it was all about creating a copy of Y. I.e., I noticed too late that Anastasia's problem is to set

[sage-support] Re: Reduce all coefficients of multivariate polynomial to 1

2016-12-04 Thread Simon King
On 2016-12-02, D. S. McNeil wrote: > You can arrive at your goal in lots of ways. You could sum the component > monomials, which is short but less general: > > sage: R. = QQbar[] > sage: P = x1^2 + 2*x1*x2 + x2^2 + 2*x1*x3 + 2*x2*x3 + x3^2 + 2*x1 + 2*x2 + > 2*x3 + 1 >

[sage-support] Re: Conversion from ring to unit group

2016-11-23 Thread Simon King
Hi, On 2016-11-23, Friedrich Wiemer wrote: > not sure if this make sense: I would like to convert elements > from a ring to elements in the ring's unit group (with raising > exceptions, if the ring element is not in the unit group). > So what I'm looking for is

[sage-support] Re: Solve gives incorrect solutions for polynomial

2016-11-10 Thread Simon King
Hi Karl-Dieter, On 2016-11-09, kcrisman wrote: >> > This is a very good question for Ask Sage, would you ask it there? >> >> Why should he? He did ask here. And I, for one, dislike the Ask Sage >> pages to the extent that I wouldn't answer questions there. >> > >

[sage-support] Re: Solve gives incorrect solutions for polynomial

2016-11-09 Thread Simon King
On 2016-11-08, slelievre wrote: > This is a very good question for Ask Sage, would you ask it there? Why should he? He did ask here. And I, for one, dislike the Ask Sage pages to the extent that I wouldn't answer questions there. Cheers, Simon -- You received this

[sage-support] Re: Element vs UniqueRepresentation

2016-10-11 Thread Simon King
["Followup-To:" nach gmane.comp.mathematics.sage.devel gesetzt.] On 2016-10-11, Simon King <simon.k...@uni-jena.de> wrote: > Hi Jeroen, > > On 2016-10-10, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: >> Maybe I'm misunderstanding you, but what I wanted to

[sage-support] Re: Element vs UniqueRepresentation

2016-10-11 Thread Simon King
Hi Jeroen, On 2016-10-10, Jeroen Demeyer wrote: > Maybe I'm misunderstanding you, but what I wanted to say is: Python 3 > doesn't have any place to hook a custom metaclass. Is there a way to have a metaclass similar to our ClasscallMetaclass at all, in Python3?? I just

[sage-support] Re: Element vs UniqueRepresentation

2016-10-10 Thread Simon King
Hi Jeroen, On 2016-10-10, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > On 2016-10-10 10:47, Simon King wrote: >> The meta-metaclass would take the >> atomic metaclasses appearing in the bases of a class definition "Foo", >> and would automatically/dy

[sage-support] Re: Element vs UniqueRepresentation

2016-10-10 Thread Simon King
Hi Jeroen, On 2016-10-10, Jeroen Demeyer wrote: > Try this: > > sage: from sage.misc.inherit_comparison import > InheritComparisonClasscallMetaclass > sage: class A(Element, UniqueRepresentation): > : __metaclass__ = InheritComparisonClasscallMetaclass In other

[sage-support] Re: Using sage for student quizzes

2016-08-24 Thread Simon King
Hey Leif, On 2016-08-24, leif wrote: >> Is that an option, if security concerns are relevant? My university >> wouldn't allow to store the student's personal information on servers in >> the USA. > > OT, but if I'm not mistaken, that's actually current law in the EU.

[sage-support] Re: Using sage for student quizzes

2016-08-24 Thread Simon King
Hi Dima, On 2016-08-24, Dima Pasechnik wrote: > On Wednesday, August 24, 2016 at 3:50:32 AM UTC+1, Andrew wrote: >> >> Does anyone have experience in using sage for on-line quizzes that count >> towards student assessment. Of course, in addition to writing the code and >>

[sage-support] Re: Speed comparison to Mathematica

2016-05-04 Thread Simon King
PS: Here is an example: On 2016-05-03, Simon King <simon.k...@uni-koeln.de> wrote: > For Cython code in Sage, there is a %crun available that gives you some > statistics on C-functions called during a computation. It needs > gperftools being installed. sage: M = random

[sage-support] Re: Speed comparison to Mathematica

2016-05-03 Thread Simon King
On 2016-05-02, Ralf Stephan wrote: > That you can't trace Cython is fortunately not true. > I do it from time to time using gdb when I trace pynac code. > Of course it's not C/Python but its cythonization, the > translated C code. The associated Cython is handily shown > in

[sage-support] Re: [Cython] Howto import pure c function versions of sagemath functions into cython

2016-05-02 Thread Simon King
Hi Max, On 2016-05-01, Max Külshammer wrote: > I would like to use a sage function (is_power_of) in an cython program I am > writing (via %cython in SMC). To speed things up I would like to import the > c version of is_power_of which can be found > in >

[sage-support] Re: Calculation of basis taking over 12 hours?

2016-03-31 Thread Simon King
Hi Saad, On 2016-03-31, saad khalid wrote: > Oh wow... so there's a possibility that the calculation might take million > of years for what I'm trying to do? Or there some easy way to approximate > how long it will take based off of how many variables I have? Thank you!

[sage-support] Re: about vector subspace

2016-03-26 Thread Simon King
Hi Alexandr, On 2016-03-26, Александр Шевченко wrote: > I have next problem, when I write next strings. > > V = VectorSpace(F,n)S = V.subspace(basis) > > > but basis!=S.basis() > > However, I need to basis has not changed. Do you know "tab completion"? It

[sage-support] Re: Linear algebra and least squares regression

2016-03-02 Thread Simon King
Hi! On 2016-03-02, Michael Orlitzky wrote: >> 1) Creating a vector space V over the field of Svalbard (all reals) or C of >> a given dimension n. > > sage: VectorSpace(RR,n) > > or > > sage: VectorSpace(CC,n) Or simply sage: CC^2 Vector space of dimension 2 over

[sage-support] Re: Is there a solution ?

2016-02-03 Thread Simon King
Hi Volker, On 2016-01-03, Volker Braun wrote: > PS: Since this was a recent improvement, the Sage numeric type now register > with the pep3141 abstract numbers class so you can (and should) do test like > > sage: import numbers > sage: isinstance(5,

[sage-support] Re: Symbic callable Boolean Functions

2015-12-06 Thread Simon King
Hi Prakash, On 2015-12-06, Nils Bruin wrote: > On Saturday, December 5, 2015 at 10:49:46 PM UTC-5, Prakash Dey wrote: >> >> >> x,y -> symbolic boolean variables >> f ---> symbolic Boolean function >> >> Does > > sage: P.=BooleanPolynomialRing(); > sage: f=x+y > sage:

[sage-support] Re: Where is possible to view the code of one command? for example: lagrange_polynomial?

2015-10-06 Thread Simon King
Hi Jori, On 2015-10-06, Jori =?ISO-8859-1?Q?M=E4ntysalo?= wrote: > Yes, it works on command line and on jyputer notebook. But with older Sage > notebook it does not. Same happens if you type Yes, that's what I meant. Some people have tried to make the Sage notebook a

[sage-support] Re: Where is possible to view the code of one command? for example: lagrange_polynomial?

2015-10-05 Thread Simon King
Hi Karl-Dieter, On 2015-10-05, kcrisman wrote: >> Hi everyone, where it is possible to find the code of each command or >> maybe documentation? For example lagrange_polynomial. How can one see the >> function code, but documention would be better. Thank you in advance. >> >

[sage-support] Re: correct derivative command returns syntax error

2015-09-21 Thread Simon King
Hi Germano, On 2015-09-21, Germano Massullo wrote: >> >> derivative(5*x, x) > > Putting a * solves the problem. Does SageMath really need * symbol to > understand that 5x is 5*x If yes there is something really wrong in SM > syntax... What computer algebra

[sage-support] Re: sum of piecewise functions

2015-09-10 Thread Simon King
Hi! On 2015-09-10, springfield .gion wrote: > Hi, I wanted to get the sum of two piecewise linear functions, but the > obvious thing does not seem to work; is there an easy (= already > implemented) way to do this? > here is what I mean: > > R. = RR[] > a =

[sage-support] Re: List the codewords of minimum weight

2015-09-10 Thread Simon King
Hi Nathann, On 2015-09-10, Nathann Cohen wrote: >> Seriously? At first, it crashed Sage with an error message asking me to >> install some package---which my OS did not know. Volker eventually told >> me that I have to install -devel... > > But I know that I have all the

[sage-support] Re: List the codewords of minimum weight

2015-09-10 Thread Simon King
Hi Nathann, On 2015-09-10, Nathann Cohen wrote: > HMmm... The odd thing is that %prun does not say much about what the > bottleneck is in those computations. It seems that GAP works in the > background, but I do not see it there ... Perhaps %crun helps? Best regards,

[sage-support] Re: List the codewords of minimum weight

2015-09-10 Thread Simon King
On 2015-09-10, Simon King <simon.k...@uni-jena.de> wrote: > At first, it crashed Sage with an error message asking me to > install some package---which my OS did not know. Volker eventually told > me that I have to install -devel... Now I recall: The error mentioned gperft

[sage-support] Re: List the codewords of minimum weight

2015-09-10 Thread Simon King
Hi Nathann, On 2015-09-10, Nathann Cohen wrote: >> Perhaps %crun helps? > > Ahahaa. Well I gave it a try and it crashed Sage every time without > any error message. Didn't feel like debugging this now ^^; Seriously? At first, it crashed Sage with an error message asking

[sage-support] Re: List the codewords of minimum weight

2015-09-10 Thread Simon King
Hi Nathann, On 2015-09-10, Nathann Cohen wrote: > It is still relatively easy to make this %crun crash, though: > > sage: %crun -s cumlative BIBD_45_9_8(True) > /home/ncohen/.Sage//sage: line 134: 3174 Profiling timer expired > "$SAGE_ROOT/src/bin/sage" "$@" I got a

[sage-support] Re: Broken links to

2015-09-02 Thread Simon King
Hi William, On 2015-09-01, William Stein <wst...@gmail.com> wrote: >>> Anyway, let's stop telling Simon King that Bitbucket or Github will >>> solve his 30GB of data hosting problem, when they don't. >> >> >> Agreed. There are two problems, not quite t

[sage-support] Re: Broken links to http://sage.math.washington.edu/home/SimonKing/Cohomology/

2015-08-29 Thread Simon King
Hi Dima, On 2015-08-28, Dima Pasechnik dimp...@gmail.com wrote: will still give you ssh access, to the same files in your homedir. (at least it works for me). Not for me. I'd suggest that you start by, at least, hosting the package's git (or is it hg?) repo on github. This takes 5

[sage-support] Re: Broken links to http://sage.math.washington.edu/home/SimonKing/Cohomology/

2015-08-29 Thread Simon King
Hi William, On 2015-08-28, William A Stein wst...@uw.edu wrote: Simon, etc. -- find hosting elsewhere. Github makes hosting of 2GB binaries for free trivial, so use that. The data base is 30GB, if I recall correctly. And how can I log into my account at sage.math.washington.edu? Best

[sage-support] Re: Broken links to http://sage.math.washington.edu/home/SimonKing/Cohomology/

2015-08-29 Thread Simon King
Hi! To the OP: I don't know if you are still following this thread. But if you want to try the spkg, please contact me by e-mail, and I'll send you an spkg that should work with the latest version of SageMath. It would not be able to use the public database of cohomology rings of groups of order

[sage-support] Re: Broken links to http://sage.math.washington.edu/home/SimonKing/Cohomology/

2015-08-28 Thread Simon King
Hi Scott, On 2015-08-28, Scott Morrison scott.morri...@gmail.com wrote: There are a number of sources around the web that refer to http://sage.math.washington.edu/home/SimonKing/Cohomology/ for explanations of doing group cohomology calculations in Sage, but that link is now broken. Wow,

[sage-support] Re: Broken links to http://sage.math.washington.edu/home/SimonKing/Cohomology/

2015-08-28 Thread Simon King
Hi Karl-Dieter, On 2015-08-28, kcrisman kcris...@gmail.com wrote: I think that was a result of some legal wrangling at UW regarding what Sage stuff is/isn't permissible, and at least for some time everything was turned off... iirc? William, I recall you saying that, for the long-term,

[sage-support] Re: [sage-devel] Re: a sage bug

2015-07-13 Thread Simon King
Hi Volker, On 2015-07-13, Volker Braun vbraun.n...@gmail.com wrote: You can use tor (https://www.torproject.org) to access the entire internet or gmane (http://dir.gmane.org/gmane.comp.mathematics.sage.devel) specifically for sage-devel. I wouldn't be surprised if they blocked tor, too (and

[sage-support] Re: bug in == operator?

2015-07-13 Thread Simon King
Hi all, On 2015-07-13, Nathann Cohen nathann.co...@gmail.com wrote: PS Testing over QQbar certainly does give False, as it would for m*sqrt(1/2) and n for any pair of integers (m,n) not (0,0), since sqrt(2) is irrational! Wouldn't it be better to compare 'exact types' in an exact ring? Here

[sage-support] Re: bug in == operator?

2015-07-13 Thread Simon King
Hi William, On 2015-07-13, William Stein wst...@gmail.com wrote: Despite what other people are saying in this thread, I definitely 100% consider the above a bug. My impression is that all participants of this thread agree that it is a bug. Doing m == m1, should first coerce both to SR, then

[sage-support] Re: bug: adding a number to matrix

2015-07-12 Thread Simon King
Hi Avi, On 2015-07-12, avi kaur kauravi...@gmail.com wrote: Hello I figured out that when we add a number to a matrix, It adds this number to all the elements at diagonal of matrix. for example: That's the expected behaviour. If R is a commutative ring and M is the ring of all nxn matrices

[sage-support] Re: factorize quadratic functions

2015-06-02 Thread Simon King
Hi Georg, On 2015-06-02, ggrafendorfer georg.grafendor...@gmail.com wrote: sage: g(x) = x^2 - 26*x -9 sage: g.factor() x^2 - 26*x - 9 First of all, what you create is a symbolic function, so, factorisation doesn't really make sense. sage: g(x) = x^2-26*x-9 sage: g x |-- x^2 - 26*x - 9

[sage-support] Re: Casting a univariate poly to multivariate

2015-05-19 Thread Simon King
Hi Nils, On 2015-05-18, Nils Bruin nbr...@sfu.ca wrote: On Monday, May 18, 2015 at 2:43:46 AM UTC-7, Simon King wrote: - There are ways to make the conversion automatic, but I would recommend against it (perhaps it is safer to use K2.register_conversion instead of K2.register_coercion

[sage-support] Re: Casting a univariate poly to multivariate

2015-05-19 Thread Simon King
Hi John, On 2015-05-19, John Cremona john.crem...@gmail.com wrote: -- assuming that the generators have the same minimal polynomial of course! what about the general case? We are talking here about default conversion. I guess K1.hom([K2.gen()]) (mapping generator to generator) is the only

[sage-support] Re: Casting a univariate poly to multivariate

2015-05-18 Thread Simon King
Hi Evrim, On 2015-05-15, Evrim Ulu evrim...@gmail.com wrote: sage: f x^6 + a*x^5 + (a + 1)*x^4 + (a^2 + a + 1)*x^3 + (a^2 + 1)*x^2 + (a + 1)*x + a^2 + a + 1 sage: f.parent() Univariate Polynomial Ring in x over Finite Field in a of size 2^3 sage: R Multivariate Polynomial Ring in l0, l1,

[sage-support] Re: Casting a univariate poly to multivariate

2015-05-18 Thread Simon King
Hi Evrim! On 2015-05-18, Simon King simon.k...@uni-jena.de wrote: I did some tests, and found that I could not construct *any* isomorphism of field extensions. Does anyone know how to construct an isomorphism between GF(8,'a') and GF(8,'h') leaving the prime field invariant? Aha! This is how

[sage-support] Re: Why inequalities are not converted to boolean?

2015-04-01 Thread Simon King
Hi William, On 2015-04-01, William Stein wst...@gmail.com wrote: That was new to me. Why Sage can not raise exception? Given the amount of confusion this causes I think we should discuss / consider changing this. That discussion should of course take place on sage-devel (not here), but

[sage-support] Re: solve(-(1/2*sqrt((4*w+1)+1))*t+w==0,w)

2015-03-09 Thread Simon King
Hi! On 2015-03-09, platane guo...@gmail.com wrote: Thanks to Emmanuel Charpentier for the solution. But the trick is S1[0]^2 that needs human works. Sure. But that's a very common situation. Computers are very good in many computational aspects, but still human insight is needed to break a

[sage-support] Re: Simplify square root of square

2015-02-27 Thread Simon King
Hi Paul, On 2015-02-27, Paul Royik distantjob...@gmail.com wrote: What is the way to consistently simplify square roots of squares? Examples: sqrt((x+1)^2) - x+1 sqrt(cos(4*x)+1) - sqrt(2)cos(2x) Simplification must not change the value of the expression. sqrt(x^2) is certainly not equal

[sage-support] Re: Improving a Sage program that is heavy on matrix multipliaction

2014-12-04 Thread Simon King
Hi Vincent, On 2014-12-04, Vincent Delecroix 20100.delecr...@gmail.com wrote: sage: M = matrix(RR, [[-1]]) sage: abs(M) -1.00 So the problem is with abs(M). The reason is that abs(M) is calling the method M.__abs__(). The latter one is just a shortcut for the determinant. I

[sage-support] Re: Porting one Python code to a Sage one

2014-11-27 Thread Simon King
Hi Christophe, On 2014-11-27, Christophe Bal projet...@gmail.com wrote: Indeed, my question is related to pedagogical reasons. Even if my code is simple, it uses the import machinery that I would like to not use. Why not? Isn't it a good thing to teach students that polluting the global name

[sage-support] Re: How to free memory used by object?

2014-11-26 Thread Simon King
Hi Jori, On 2014-11-26, Jori Mantysalo jori.mantys...@uta.fi wrote: m=0 for P in Posets(n): m=max(m, f(P)) Now, it seems that this eats memory. I guess that is because of UniqueRepresentation that Poset inherits. UniqueRepresentation uses a weak value dictionary. Hence, when you loop

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

2014-11-12 Thread Simon King
Hi! On 2014-11-11, Peter Mueller ypf...@googlemail.com wrote: Is it needed to install an optional package first? Which? indeed, you have to install cbc-2.8.1.p0 first (if you have sage version 6.3). It takes some time to compile. Thanks! I can confirm that there is a leak, and it seems

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

2014-11-11 Thread Simon King
Hi Peter, On 2014-11-11, Peter Mueller ypf...@googlemail.com 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,

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

2014-11-11 Thread Simon King
Hi Peter, On 2014-11-11, Peter Mueller ypf...@googlemail.com 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.

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

2014-11-07 Thread Simon King
Hi, On 2014-11-05, moep ooomoep...@googlemail.com 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

[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

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

2014-10-01 Thread Simon King
Hi Dima, On 2014-10-01, Dima Pasechnik dimp...@gmail.com 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) type 'sage.libs.gap.element.GapElement_Record' but...

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

2014-10-01 Thread Simon King
On 2014-10-01, Volker Braun vbraun.n...@gmail.com 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

[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 jhpalmier...@gmail.com 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

[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 kevin.m.buzz...@gmail.com 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   2   3   4   5   6   7   8   9   10   >