[sage-support] Stein-Watkins fails to install

2009-05-29 Thread Nils Bruin
The full Stein-Watkins package fails to install cleanly on x86_64- redhat-linux http://modular.math.washington.edu/Tables/ecdb/stein-watkins-ecdb.spkg The relevant lines from install-log seem to be: mv: invalid option -- r Try `mv --help' for more information. Since the install script only

[sage-support] Firefox and jsMath on Fedora 7

2007-07-04 Thread Nils Bruin
Did anybody have any luck on getting firefox to recognize the tex fonts on fedora 7? I have tried all suggested approaches in the jsmath font help, but without success. I also turned on font.FreeType2.enable in about:config, which is off by default. Konqueror can now find the fonts quite happily

[sage-support] Re: Firefox and jsMath on Fedora 7

2007-07-04 Thread Nils Bruin
Update: The standard firefox build from Mozilla has no problems on Fedora 7. The problem only arises when you try to use Fedora's own build. about:buildconfig does point out some important differences: standard: ... --endable-xft ... fedora: ... --enable-pango --enable-system-cairo ... so it

[sage-support] Re: How to run the notebook in the background

2007-08-14 Thread Nils Bruin
Thank you for the responses. It turns out that indeed sending a sigint does the trick, but you have to send it to the right process. In hindsight it's the obvious one, but it took me some experimentation. For posterity: In order to kill a sage notebook gracefully, execute (pun not quite

[sage-support] Trouble with sagenb.org

2008-02-13 Thread Nils Bruin
I know that sagenb.org is only a service that runs on William's kindness (which apparently has multiple cores), but since its existence is still advertised on sagemath.org, I assume it's the intention that it should be accessible. Presently I get a 502 Bad Gateway error when I try to connect

[sage-support] Re: Symbolic Expression

2009-09-15 Thread Nils Bruin
On Sep 15, 6:24 pm, Stefan Boettner sboet...@tulane.edu wrote: Hello, I'm trying to parse symbolic expressions, but got stuck very quickly. If I say: (x^2).operator() I get: built-in function pow If I say: pow I also get: built-in function pow But if I say: (x^2).operator()==pow

[sage-support] Re: Symbolic derivative question

2009-09-28 Thread Nils Bruin
On Sep 28, 11:30 am, Tim Lahey tim.la...@gmail.com wrote: sage: f = function('f',t) sage: h = f.diff(t,1) sage: h.subs(t=0) D[0](f)(0) Based upon what I recall about the D notation, that's the derivative of f(t) evaluated at t = 0. The f(0) tells where it's evaluated at and the D[0]

[sage-support] Re: Symbolic derivative question

2009-09-28 Thread Nils Bruin
On Sep 28, 3:09 pm, Tim Lahey tim.la...@gmail.com wrote: The D notation is used in Maple as an option, but almost always allows conversion to the standard notation. OK, this thread should probably go to sage-devel or elsewhere, but I don't know how to do that. Maple actually falls back on

[sage-support] Re: Symbolic derivative question

2009-09-29 Thread Nils Bruin
This thread now contains some examples of how different computer algebra systems handle the chain rule. The following might help in sage - maxima communication: By default, maxima leaves an expression: diff( f(g(a,b,c),u,v), a) untouched. But maxima can in fact represent the result from

[sage-support] Re: A little problem with map_threaded

2009-10-24 Thread Nils Bruin
On Oct 23, 4:40 am, Alasdair amc...@gmail.com wrote: Here is an example: sage: G.x=GF(2^8) sage: M=random_matrix(G,2,2) sage: map(int,M.row(0)) [152, 58] sage: map_threaded(int,M) TypeError: base_ring (=type 'int') must be a ring Why won't map_threaded work where map does? Note that

[sage-support] Re: linguistic help

2010-03-26 Thread Nils Bruin
On Mar 26, 8:51 am, bb bblo...@arcor.de wrote: I do not understand a sentence in the Installation manual as there is written: If you do this, make sure you edit the line with the ‘s at the top of the sage script. In this section simply the Path $SAGE_ROOT/sage should be copied into the

[sage-support] Re: How do I clear some variables after declaring them?

2010-04-23 Thread Nils Bruin
On Apr 22, 11:21 am, Jason Grout jason-s...@creativetrax.com wrote: On 04/22/2010 12:33 PM, eric948470 wrote: If I declare some variables, and after completing the calculation I don't want them to be variables anymore, how do I make them not variables anymore? You can just delete them

[sage-support] bug in maxima solve?

2010-05-28 Thread Nils Bruin
I have not been able to get the following behaviour out of maxima directly, but the following code illustrates that maxima's solve forgets about some solutions: def realzeros(f,g): t = polygen(QQbar) P = parent(f) R = f.resultant(g,P.0) yvals = [yval[0] for yval in R(0,t).roots()

[sage-support] Re: Using functions and classes from other worksheets in online notebook

2010-06-09 Thread Nils Bruin
On Jun 9, 4:43 am, dbjohn johndbren...@gmail.com wrote: I published two worksheets: called testpublish1 and testpublish2. I haven't managed to successfully load either of them. I tried different combinations 'http://www.sagenb.org/home/pub/2127/'is the correct url of the worksheet.

[sage-support] Re: Unexact computation with roots of unity.

2010-06-22 Thread Nils Bruin
On Jun 22, 11:13 am, cjung cjun...@gmx.de wrote: My question is now, if this is a bug or just a mistake in my code? I suspect that you create your roots of unity using exponents that are floats. In that case it may be a bug in Sage that it doesn't throw an error. It may be what you are

[sage-support] Re: Running Sage remotely via web browser w/ firewall enabled(?)

2010-06-29 Thread Nils Bruin
You could use ssh to tunnel through the firewall: http://groups.google.ca/group/sage-devel/browse_thread/thread/936f563a4984a80/7b9b015c777fdb64 the only extra exposure you get then is that any person who can log in to your machine, can execute code with the privileges that the sage server runs

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

2010-07-28 Thread Nils Bruin
On Jul 28, 10:35 am, Simon King simon.k...@nuigalway.ie wrote: The point is that some people (including myself) believe that polynomials belong to algebra, whereas differentiation is calculus. A polynomial and a polynomial function are two very different things. So, how (and why) would one

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

2010-07-28 Thread Nils Bruin
On Jul 28, 1:58 pm, Simon King simon.k...@nuigalway.ie wrote: Anyway. While differential rings are certainly nice algebraic structures, I feel uncomfortable to think of a derivation as some calculus stuff. The theory of Kaehler differentials does a pretty good job providing differential

[sage-support] Re: sum(.., n) doesn't work if n is a loop iterator.

2010-07-29 Thread Nils Bruin
On Jul 28, 10:20 pm, sriram srinivasan sri...@malhar.net wrote: Thanks much for your note. What surprises me is that sum() doesn't need coercion to sage integers when working with int-typed variables and numbers: That is because the sage shell and notebook preprocess input such that integer

[sage-support] Re: Sage running slowly in Ubuntu compared to VirtualBox

2010-08-09 Thread Nils Bruin
Have you checked if your processors are actually running at the full 2.00 GHz? Most linux distributions throttle the CPU to conserve power nowadays, using an on demand policy. I have seen less than perfect adjusting of the CPU speed under low load. Try fixing your CPU speed to maximum and see if

[sage-support] Re: symbolic calculation with roots of a polynomial of degree = 5

2010-08-15 Thread Nils Bruin
On Aug 15, 10:37 am, Philipp Schneider philipp.schneid...@gmx.net wrote: Hi, I'm trying to symbolically calculate the product of all roots of the polynomial x^5 - 3*x -1. (The answer should of course be 1). Numerically I can compute the product as follows: sage: x = polygen(QQbar) sage:

[sage-support] Re: symbolic calculation with roots of a polynomial of degree = 5

2010-08-15 Thread Nils Bruin
I got curious how close you can presently get constructing a galois closure. Singular allows you to get part-way there: sage: P.r1,r2,r3,r4,r5=QQ[] sage: PX.X=P[] sage: QQx.x=QQ[] sage: gen_cfs=prod((X-r for r in P.gens())).list() sage: F=x^5-3*x-1 sage: spec_cfs=(F).list() sage:

[sage-support] Re: symbolic calculation with roots of a polynomial of degree = 5

2010-08-15 Thread Nils Bruin
On Aug 15, 1:40 pm, Philipp Schneider philipp.schneid...@gmx.net wrote:  Nils, thanks for you answer. Basically, the answer to How do I compute explicitly with the conjugates of an algebraic number is Don't. Actually I'm just trying to convert an example from mathematica/maple to sage.

[sage-support] Re: Number of CPUs?

2010-09-03 Thread Nils Bruin
On Sep 3, 11:13 am, Simon King simon.k...@nuigalway.ie wrote: Probably not. I guess what I am asking is whether the functionality of the sage-test script is available as a function that can be imported into sage. Since up to now no-one seems to be able to answer that question, I'll speculate.

[sage-support] Re: Two basic questions

2010-09-05 Thread Nils Bruin
On Sep 5, 3:17 pm, Nick aroy...@gmail.com wrote: Q1. How can I extract elements from a solution set? For example, consider: sage: x, y = var('x, y') sage: solve([x+y==6, x-y==4], x, y) [[x == 5, y == 1]] If you use solution_dict=true, you get the solutions back in a form that is probably

[sage-support] Re: creating variables in Polynomial Ring

2010-09-07 Thread Nils Bruin
On Sep 7, 1:34 pm, tvn nguyenthanh...@gmail.com wrote: Hi John and Jason,  thanks  --  the inject_variables() did what I want. I have another question below and hope you can help what if I already have create a function call f = x - y as below sage: vs = var('x y') sage: f = x - y sage:

[sage-support] Re: monic list

2010-09-08 Thread Nils Bruin
On Sep 8, 3:52 pm, andrew ewart aewartma...@googlemail.com wrote: supose i have an input list (which is a list of unknown size) and where each term is a polynomial of form f(x,y) i want to define a function moniclist(list) such that the output makes each term of list monic wrt x eg if

[sage-support] Re: monic list

2010-09-09 Thread Nils Bruin
On Sep 9, 4:08 am, andrew ewart aewartma...@googlemail.com wrote: no it should be chekcing the term with the highest power of x and then make it monic that includes possibilitys like x*y as this is not monic wrt x If I understand your description correctly, that is what the code does. Compare

[sage-support] Re: summation

2010-09-17 Thread Nils Bruin
On Sep 17, 1:23 pm, sps debernasave...@libero.it wrote: I'm a mathematician, not a traslator of uncomprensible characters!! Many non-mathematicians would argue that the latter implies the former :-) Computer algebra packages such a maxima have to work a little to squeeze mathematical notation

[sage-support] Re: Differentiation inverse function. How it is correct?

2010-09-19 Thread Nils Bruin
On Sep 18, 6:43 pm, kcrisman kcris...@gmail.com wrote: Actually, the subject of your email now makes a little more sense. But I don't think that one can define an inverse function quite this easily!  That would indeed be *very* obscure notation!  I don't know if we can define a symbolic

[sage-support] Re: Question about polynomial rings and their fraction fields

2010-09-25 Thread Nils Bruin
On Sep 24, 6:56 pm, kcrisman kcris...@gmail.com wrote: If I make a polynomial ring using sage: b = PolynomialRing(ZZ, 'x') I get some odd behavior.  Namely, sage: bool(b(x)==x) True I personally find this slightly worrisome, but this was a design decision (equality respects automatic

[sage-support] Re: Concise way of filtering elements of a permutation group

2010-10-01 Thread Nils Bruin
On Oct 1, 9:06 pm, Rafael rvf0...@gmail.com wrote: Hi to all, Let us say that reg is a permutation group. I want to find the elements of reg that send 12 to 1. Is there a better way to do that (in one step, say) than: sage: def f(x): return x(12)==1 : sage: filter(f,reg.list())

[sage-support] Re: Concise way of filtering elements of a permutation group

2010-10-01 Thread Nils Bruin
On Oct 1, 9:22 pm, Nils Bruin nbr...@sfu.ca wrote: Compute the stabilizer of 12 and compose with (1,12). Sorry, that was too quick. First determine if 1 and 12 are in the same reg orbit and select an element h of reg that sends 12 to 1. Now determine the stabilizer subgroup of 12 in reg

[sage-support] Re: Concise way of filtering elements of a permutation group

2010-10-02 Thread Nils Bruin
On Oct 2, 1:55 pm, Rafael rvf0...@gmail.com wrote: Rafael rvf0...@gmail.com writes: Hi to all, Let us say that reg is a permutation group. I want to find the elements of reg that send 12 to 1. Is there a better way to do that (in one step, say) than: sage: def f(x): return x(12)==1

[sage-support] Re: total differentiation

2010-10-08 Thread Nils Bruin
On Oct 8, 3:57 pm, Oscar Lazo estadisticame...@gmail.com wrote: Hello! Is there some way to calculate a total differential in sage? I'm thinking of something that in mathematica would be done like this: In[1]:= f=x^2+y+Sin[z] In[2]:= Dt[f,m] Out[2]= 2 x Dt[x, m] + Dt[y, m] + Cos[z] Dt[z,

[sage-support] Re: how to change numpy datatype

2010-10-19 Thread Nils Bruin
On Oct 19, 6:57 pm, 李季 liji.ma...@gmail.com wrote: Dear group, I have a question as follow: import numpy as np B = np.array([[1, 2, 3], [4, 5, 6]]) Is there any command that I can use to convert B  to  a float-type? For more information you should probably look at the numpy manual and/ or

[sage-support] Re: klein quartic symmetry group

2010-10-22 Thread Nils Bruin
On Oct 22, 10:00 am, andrew ewart aewartma...@googlemail.com wrote: What is the best way of writing out code to calculate the symmetry group of the Klein Quartic (The klein quatric is the set of the solutions to f=0, where f is the polynomial x^3*y+y^3*z+z^3+x in QQ[x,y,z]) I know of 2

[sage-support] Re: Python or Sage behavior?

2010-10-23 Thread Nils Bruin
On Oct 23, 12:27 am, Rolandb rola...@planet.nl wrote: Hi, look at the following simple routine. def why():     test=((k2,k1) for k1 in xrange(2,4) for k2 in xrange(1,k1) if gcd(k1,k2)==1)     print [t for t in test]     print [t for t in test]     return why() [(1, 2), (1, 3), (2,

[sage-support] Re: Show function in the notebook

2011-02-06 Thread Nils Bruin
On Feb 6, 8:02 am, Dox o.castillo.felis...@gmail.com wrote: show(exp, subs=('bph':\hat{\phi})) You can set the latex representation of symbols upon their creation. Does the following do what you want? sage: var(phihat,latex_name=r\hat{\phi}) phihat sage: latex(phihat^2+2) \hat{\phi}^{2} + 2 --

[sage-support] Re: linalg solve() : why solve([x == 2*y,w==10],y) returns [] ?

2011-02-08 Thread Nils Bruin
On Feb 8, 10:09 am, tvn nguyenthanh...@gmail.com wrote: I try to solve for y using the 2 simple equations x == 2*y , w==10   -- basically I expect y = x/2  since the 2nd equation is irrelevant,  however it returns []  ?   The second equation is not irrelevant. It just does not contain any

[sage-support] Re: linalg solve() : why solve([x == 2*y,w==10],y) returns [] ?

2011-02-08 Thread Nils Bruin
On Feb 8, 10:30 am, tvn nguyenthanh...@gmail.com wrote: this is what I am trying to do  -- is there a way to have it to return uk = w-y ? [...] sage: solve([uk + x + 2*y == A*B,   w + x + y == A*B],[uk,x]) [[uk == w - y, x == A*B - w - y]] You answer your own question. sage: solve([uk + x +

[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-12 Thread Nils Bruin
On Feb 11, 4:54 pm, tvn nguyenthanh...@gmail.com wrote: I am trying to do something like this -- it seems simple but I don't know how to do so in Sage given a set of equations x == A*i + B*j y == A*k + B*m z == B*(j-m) + A*(i-k) Now I want to solve for z in terms of x and y ,  simple

[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-13 Thread Nils Bruin
On Feb 12, 2:22 pm, Volker Braun vbraun.n...@gmail.com wrote: You can also use the symbolic ring: sage: var('x,y,z,A,B,k,i,j,m') (x, y, z, A, B, k, i, j, m) sage: solve([x == A*i + B*j, y == A*k + B*m, z == B*(j-m) + A*(i-k)], [z,i,m]) [[z == x - y, i == -(B*j - x)/A, m == -(A*k - y)/B]]

[sage-support] Re: Error in using PolynomialRing(QQ, vars) and elimination_ideal()

2011-02-14 Thread Nils Bruin
On Feb 14, 9:54 am, tvn nguyenthanh...@gmail.com wrote: sage: R.x,y,z,A,B,k,i,j,m=QQ[] This is a shorthand notation that assigns to x, ..., m the polynomial variables generating QQ[x,y,z,...,m] sage: J=I.elimination_ideal([k,i,j,m,A,B]) This routine expects a list of polynomial variables as

[sage-support] Re: notebook: how store a cell contents in a database

2011-02-22 Thread Nils Bruin
On Feb 21, 1:53 am, Pedro Cruz pedrocruzave...@gmail.com wrote: I'm going to add         input += '_interact_.SAGE_CELL_BZ2TEXT=%r\n' % bz2.compress(C.input_text()) It uses bz2 because it's already on worksheet.py and to avoid string_inside_string problems. You may want to consider input +=

[sage-support] Re: coercion does work in 4.5.2, does not work in 4.6(.2)

2011-05-03 Thread Nils Bruin
On May 3, 3:28 pm, eggartmumie eggartmu...@googlemail.com wrote: Hi, as a newbie I am rather irritated about coercion working in 4.5.2 and not working in 4.6. In 4.5.2 the following works nicely and up to expectation F.x=GF(2^4); for i in range(15):     a = x^i; print a,'with integer

[sage-support] Re: coercion does work in 4.5.2, does not work in 4.6(.2)

2011-05-03 Thread Nils Bruin
On May 3, 7:23 pm, Nils Bruin nbr...@sfu.ca wrote: See a.log_to_int? for help. ... which says Use int(self) to directly get a Python int. so it looks like you have found a bug in the documentation! You help the project if you would file a report and you would really help if you'd also include

[sage-support] Re: solving for x in different theory

2011-05-16 Thread Nils Bruin
On May 16, 3:10 pm, tvn nguyenthanh...@gmail.com wrote: So Is it possible to force x to be in the theory of Integer so that solving for 2*x == 1 will return Not Possible or something similar  ?   If you formulate the problem as finding the integer roots of an integer polynomial, you get what

[sage-support] Re: Iterating over finite extension fields.

2011-06-02 Thread Nils Bruin
On May 25, 12:26 pm, D. Monarres dmmonar...@gmail.com wrote: Then I construct F_{5^2} sage: F25.a   = F5.extension( PR[0], 'a') and everything works great. The problem arises when  I want to extend this field. When I try to construct my polynomial over F25 I get an error that F25 does not

[sage-support] Re: Confusion and question about secure switch to Sage notebook.

2011-06-06 Thread Nils Bruin
On Jun 4, 10:37 pm, Chris Seberino cseber...@gmail.com wrote: Notebook documentation mentions a boolean switch called secure for SSL. When I try to turn it on my notebook server, I get an error about a domain Sage needs. How exactly does this switch work and how does Sage want to do SSL?

[sage-support] Re: Problem with Sage shell and sudo

2011-06-09 Thread Nils Bruin
On Jun 9, 2:23 am, Juanlu_001 juanlu...@gmail.com wrote:     juanlu@mercurius ~ $ sage -sh [...]     (sage subshell) mercurius:~ juanlu$ sudo easy_install pip     python: error while loading shared libraries: libpython2.6.so.1.0: sudo probably resets a lot of environment for security reasons,

[sage-support] Re: Must *all* notebook server pages be under SSL if server uses SSL?

2011-06-13 Thread Nils Bruin
On Jun 13, 3:16 pm, Chris Seberino cseber...@gmail.com wrote: Speed is one reason someone may want to only do the login with SSL. I just checked and when I log into PayPal, it stays in SSL mode. However, when I log into eBay, it jumps OUT of SSL mode.  Godaddy seems to do some pages with SSL

[sage-support] Re: Error: Converting from p-adics to rationals.

2011-06-16 Thread Nils Bruin
On Jun 16, 7:22 am, Mel chemmyg...@gmail.com wrote: I do want to convert to an integer in this particular case...but integers are rationals, so I don't understand why I don't just get the integer 344 when I try the following code: If you are sure that the element can be represented as an

[sage-support] Re: function id() in Sage performs different than id() in Python

2011-06-18 Thread Nils Bruin
On Jun 18, 10:30 am, tvn nguyenthanh...@gmail.com wrote: in particular sage's id()  gives different results (memory) address  for the below examples whereas python's id() gives the same  (expected) Sage uses a shell that is different from python's (sage uses IPython), and keeps a history. So

[sage-support] Re: Carrying forward Worksheets from an earlier version of Sage

2011-06-26 Thread Nils Bruin
On Jun 25, 2:37 am, Sourav Sen Gupta sg.sou...@gmail.com wrote: You are right Jason. I should've mentioned. I was talking about the Windows installations. I thought it would be similiar to that in case of Linux, but it was not. Any way out? There is an option download all active and there is

[sage-support] Re: Integrating python functions

2011-06-28 Thread Nils Bruin
On Jun 28, 7:57 am, Jason Grout jason-s...@creativetrax.com wrote: sage: preparse('a(x)=2*x') '__tmp__=var(x); a = symbolic_expression(Integer(2)*x).function(x)' And, as we know now, if we do this in the notebook, we can even change the value of 2 afterwards: def f(x): return 2*x print f(3)

[sage-support] Re: How do I make sage to solve a ODE that includes a time-dependent function?

2011-08-05 Thread Nils Bruin
On Aug 5, 8:41 am, Jose Guzman sjm.guz...@googlemail.com wrote: In either case, Sage returns the same error: TypeError: unable to make sense of Maxima expression

[sage-support] Re: Invariant Polynomes under group action

2011-08-15 Thread Nils Bruin
On Aug 15, 2:54 pm, Johannes dajo.m...@web.de wrote: I'm sorry for unclear description of the problem. So once again, let R = C[x_1,\dots,x_n]$ be my basering. I'm looking for the group G, wich leaves a finite set S of polynomes invariant under its action. So the ideal I = S is invariant under

[sage-support] Re: Failed to install maxima.fasb as a library

2011-10-08 Thread Nils Bruin
On Oct 8, 9:38 am, Patrick ABOU BAKAR amp...@gmail.com wrote: Just finished an install from source of Sage 4.7.1 on a CentOS 5.7 remote server.. Got a Failed to install maxima.fasb as a library error even though everything else works fine.. command line and notebook.. In 4.7.1, a failure to

[sage-support] Re: dumps() and loads() of symbolic functions problem

2011-10-11 Thread Nils Bruin
On Oct 11, 4:16 am, CDSousa cris...@gmail.com wrote: x = var('x'); f = function('f',x) ; s = dumps(f) ; loads(s) I get a  RuntimeError: unknown function 'f' in archive. Excellent example. That's definitely a bug. You must be the first person who tries to pickle a formal function (i.e., one

[sage-support] Re: dumps() and loads() of symbolic functions problem

2011-10-12 Thread Nils Bruin
On Oct 12, 6:39 am, CDSousa cris...@gmail.com wrote: I noticed there is no bug in sage 7.4 (sagenb.org).Eventually there must be a track ticket., so if you don't file it, someone else has to. Pynac was updated to 0.2.2 (sage-4.7.1.alpha1) and then to 0.2.3 (sage-4.7.1.alpha4) according to

[sage-support] Re: Increasing memory limit?

2011-10-17 Thread Nils Bruin
On Oct 17, 7:19 am, Eric enordens...@gmail.com wrote: What are the coefficients of the matrix? In which ring do they live? If m is the matrix, please post the result of m.parent() Every element in the 9x9 determinant is a polynomial in some variable x with integer coefficients. Doing print

[sage-support] Re: How to pop a list item in Cython?

2011-10-20 Thread Nils Bruin
On Oct 19, 12:42 pm, Simon King simon.k...@uni-jena.de wrote: In contrast to my first tests, it meanwhile seems to me that the   L[0], PyList_GetSlice(L,1,PyList_GET_SIZE(L)) idiom is faster than deque in my applications. Recall that this was the fastest replacement for pop(0), if the lists

[sage-support] Re: How to pop a list item in Cython?

2011-10-21 Thread Nils Bruin
On Oct 20, 10:44 pm, Simon King simon.k...@uni-jena.de wrote: Thus, each example of C.all_super_categories() is small, but a single elliptic curve computation could easily involve thousands of examples. Have you checked that the elliptic curve computations *use* all_super_categories? I

[sage-support] Re: Quotient field of the polynomial ring over the complex numbers

2011-10-31 Thread Nils Bruin
On Oct 18, 7:37 am, Urs Hackstein urs.hackst...@googlemail.com wrote: Let f be an element of the quotient field of the polynomial ring (in one variable) over the complex numbers. Our goal is to find representatives a and b in the polynomial ring over the complex numbers such that f=a/b. Can

[sage-support] Re: unsupported operand type(s) ????????

2011-11-17 Thread Nils Bruin
On Nov 16, 2:28 am, Laurent moky.m...@gmail.com wrote: Assuming you just want to do that a couple of times: [ a[i]-b[i] for i in range(len(a))  ] If the indexing bit does not appeal to you, you can also write [x-y for x,y in zip(a,b)] If you want a class for with - is component-wise, you

[sage-support] Re: Define polynomial rings of given variables

2011-12-05 Thread Nils Bruin
R=BooleanPolynomialRing(100,['x'+str(i) for i in [1..100]]) R.inject_variables()# if you don't really need the identifiers in Python's namespace, better skip this On Dec 5, 6:18 am, Subhadeep Banik monsieurlel...@gmail.com wrote: If I have a boolean  expression of a certain number of

[sage-support] Re: Please explain this wrong answer with implict multiplication....

2011-12-15 Thread Nils Bruin
On Dec 15, 11:26 am, Chris Seberino cseber...@gmail.com wrote: I had it turned on but I guess it doesn't get triggered for x (x -1). Any way to change the behavior or does that require a patch to Sage? You've already discussed that:

[sage-support] Re: help with filtering between two lists.

2012-01-02 Thread Nils Bruin
On Jan 2, 9:24 am, Eric Kangas eric.c.kan...@gmail.com wrote: for x in l1,l2: if l1[x:x+1]==l2[x:x+1]; That semicolon gives you the syntax error, but correcting that only exposes a runtime error. You should look at what your x is in the loop. If you write for x in range(len(l1)) you are a

[sage-support] Re: 64bit and rank-nullity [Was: Strange interaction between sage and numpy]

2012-01-08 Thread Nils Bruin
On Jan 8, 8:31 am, Vegard Lima vegard.l...@gmail.com wrote: sage: C = random_matrix(ZZ, 10, 80, distribution='uniform') sage: C.ncols() - (C.right_kernel().dimension() + C.rank()) More specifically: sage: C.right_kernel() Free module of degree 80 and rank 80 over Integer Ring Echelon basis

[sage-support] Re: Syntax error attempting to load a python file

2012-01-20 Thread Nils Bruin
On Jan 20, 4:30 pm, Jim Clark jimfortheea...@earthlink.net wrote: Could anyone shed light on what is happening here? In a sage notebook cell I wish to load a python file; I wrote the command: load(/Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py) which produces:

[sage-support] Re: Programming animation

2012-02-06 Thread Nils Bruin
On Feb 5, 8:20 am, LFS lfahlb...@gmail.com wrote: Hiya! Is there a relatively simple way to get a point to animate a point through a cycle keeping in mind my low programming skills ((like adding a wait between iterations?) ? You are probably aware of the animate command that does this for 2d

[sage-support] Re: Programming animation

2012-02-09 Thread Nils Bruin
On Feb 9, 1:46 am, LFS lfahlb...@gmail.com wrote: Is there a way to have a delay between iterations of the whole cycle? Thanks! It looks like animated GIFs in principle allow for a duration to be specified for each frame indiviually, so the answer is yes in principle:

[sage-support] Re: Question about cycles per second in SAGE

2012-02-13 Thread Nils Bruin
On Feb 13, 8:05 pm, juaninf juan...@gmail.com wrote: thanks by your attention Volker, ... but this command return the cycles per second measure? If your processor is running at 2 GHz, it means it's doing 2 * 10^9 cycles per second. If sage is the only job that is using significant computing

[sage-support] Re: speed question, numpy vs CDF

2012-02-14 Thread Nils Bruin
On Feb 14, 9:20 am, William Stein wst...@gmail.com wrote: PY_NEW is a macro that creates the class without calling __init__. This is an optimization. Hasn't that construction been made obsolete by Matrix2.__new__(Matrix2) ? See http://trac.cython.org/cython_trac/ticket/443. I think I used it

[sage-support] Re: Polynomials with Irrational coefficients

2012-02-19 Thread Nils Bruin
On Feb 19, 12:29 pm, ObsessiveMathsFreak obsessivemathsfr...@gmail.com wrote: Sage doesn't seem to like these f(x,y)=pi*x^10*y+3*x B=f(x,y).polynomial(SR) This doesn't work for a couple of reasons: * f(x,y) already lies in SR, so this could just return a constant polynomial in, say, 'z'. *

[sage-support] Re: Simplification Issue Implicates Canonical Form

2012-02-20 Thread Nils Bruin
On Feb 18, 5:24 pm, Mark Rahner rah...@alum.mit.edu wrote: converts 1/sqrt(5) to 1/5*sqrt(5) so I suspect that this issue can be traced to the GiNaC canonical form. Yes, it does so for a very good reason: By simplifying expressions this way, you're sure to recognize equal expressions. Compare

[sage-support] Re: CSV file

2012-02-27 Thread Nils Bruin
On Feb 27, 6:26 am, Jason Grout jason-s...@creativetrax.com wrote: How about the matrix constructor reads from an iterator and recognizes csv?  We could even use the numpy savetxt and loadtxt functions to more sophisticated parsing. You can already do: sage: import csv sage:

[sage-support] Re: CSV file

2012-03-02 Thread Nils Bruin
On Mar 2, 12:28 am, Robert Bradshaw rober...@math.washington.edu wrote: The difficulty with accepting an iterator (of strings) is that it is unclear if each item corresponds to a row or an element. But I would be in favor of rather liberal string parsing, so one could do Why is it easier to

[sage-support] Re: CSV file

2012-03-04 Thread Nils Bruin
On Mar 4, 1:14 am, Robert Bradshaw rober...@math.washington.edu wrote: I think it's fair to test for strings first, trying to parse, before testing if it's an iterator. This is consistant with many other objects that try to parse their string representations. sage: ZZ['x']([1,2,3]) 3*x^2 +

[sage-support] Re: How remove attached file?

2012-03-05 Thread Nils Bruin
On Mar 5, 2:10 pm, Raniere Gaia Silva r.gaia...@gmail.com wrote: Hello all, I'm starting use Sage last week and I'm having some problem to remove some file from attached_files list. Below you can see what I try. -- | Sage

[sage-support] Re: How remove attached file?

2012-03-05 Thread Nils Bruin
On Mar 5, 3:40 pm, Justin C. Walker jus...@mac.com wrote: It's worth filing a bug  on this.  The documentation is a bit, um, imprecise:        Type ``attached_files()`` for a list of all currently attached        files. You can remove files from this list to stop them from being        

[sage-support] Re: How remove attached file?

2012-03-06 Thread Nils Bruin
On Mar 6, 10:48 am, Kelvin Li ltwis...@gmail.com wrote: (By the way, if someone could help me figure out why the patchbot is encountering a doctest failure on that patch, I'd very much appreciate it!) That's because the doctest the patchbot complains about is indeed failing. Stick a line

[sage-support] Re: Java crash with plot3d

2012-03-10 Thread Nils Bruin
On Mar 5, 1:14 am, Jori Mantysalo jori.mantys...@uta.fi wrote: I am using notebook 4.7.2. This will crash java: x=var('x'); y=var('y'); plot3d(x^2+y^2, (x,-2,2), (y,-2,2)) I tested this with 64-bit Fedora 16, FF 10.0.1, java from normal Fedora repos. One user said that his Firefox in Windows

[sage-support] Re: Using Python new style string formatting in Sage

2012-03-28 Thread Nils Bruin
On Saturday, March 24, 2012 11:01:15 PM UTC-7, Dima Pasechnik wrote: Given that not every Integer fits into an int, this would be asking for trouble. Rather, Sage should specify its own format for Integer, etc. true, but Python handles the overflow gracefully by returning a long instead,

[sage-support] Re: Using Python new style string formatting in Sage

2012-03-30 Thread Nils Bruin
patch up at http://trac.sagemath.org/sage_trac/ticket/12788 -- 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: Making a movie or animation with 3d plotting of sage: animate() fails with 3D

2012-04-09 Thread Nils Bruin
On Monday, April 9, 2012 7:30:59 AM UTC-7, Tobias Weich wrote: Great! This hack is not only useful for 3D-Animation but also solves a problem I encountered some days ago: Making an animation where each frame consists of an graphics_array. I'd really appreciate if animate would be improved

[sage-support] Re: Running Sage through Apache2 with Reverse Proxy

2012-07-04 Thread Nils Bruin
On Saturday, September 10, 2011 11:13:33 AM UTC-7, Jonathan Frankel wrote: At the very least, I'd like to be able to install my own verified ssl certificate so that those warnings don't happen. I haven't been able to find a .crt or .key file, but I found about a dozen .pem files all over

[sage-support] Re: Still no way to do inert integrate in sage?

2012-08-03 Thread Nils Bruin
It's supported but it's a bit hidden: sage.calculus.calculus.dummy_integrate(x+1,x) I guess the plan is that at some point this should be doable via integrate(x+1,x,hold=true) but that requires some though, because there is a clash with var('hold') limit(hold^2,hold=0,hold=true) -- -- To

[sage-support] Re: fastest way to canonicalize a multivariate polynomial element in SR

2012-08-26 Thread Nils Bruin
If you know the variables and that your coefficients will be integers, why don't you key the dictionary on the polynomials coerced into the appropriate polynomial ring, e.g. Z['x,y,z,w']? Then you can use the dictionary to look up the original form of your equation. -- You received this

[sage-support] Re: TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined

2012-11-07 Thread Nils Bruin
On Tuesday, November 6, 2012 11:12:45 PM UTC-8, Rolandb wrote: Hi, have a look at: print [p for p in Integer(8).factor(limit=10^6)] [(2, 3L)] Is the 3L intended? No. That's a python multi precision integer as generated by sage: long(10) 10 That's a crazy type for an exponent. It

[sage-support] Re: Constructing subsapces of vector spaces

2012-12-03 Thread Nils Bruin
On Monday, December 3, 2012 5:09:40 PM UTC-8, Andrew Mathas wrote: Hi John, Thanks for the reply, but you have my problem upside down as I don't need to restrict from the ambient space to the subspace but rather to extend from the subspace to the ambient space. For example, I could

[sage-support] Re: Constructing subsapces of vector spaces

2012-12-04 Thread Nils Bruin
On Tuesday, December 4, 2012 3:14:27 AM UTC-8, Andrew Mathas wrote: Thanks Nils. I this is similar to, but more elegant than, what I tried earlier. I went back to the solution above, however, I thought that there was probably a lot of overhead in creating the space ZZ^3 and the

[sage-support] Re: slow matrix creation

2012-12-05 Thread Nils Bruin
On Wednesday, December 5, 2012 9:08:13 AM UTC-8, Volker Braun wrote: Of course fixing the cyclotomic matrix constructor would be another option ;- In fact, John, please do! As your own loop assignment shows, the problem you're experiencing is not inherent to Matrix_cyclo_dense, it's just

[sage-support] Re: slow matrix creation

2012-12-05 Thread Nils Bruin
On Wednesday, December 5, 2012 2:59:59 PM UTC-8, Maarten Derickx wrote: Maybe we should overwrite the sum() function such that it behaves different for lists, since the command sum(entries,[]) looks much more clear and intuitive then the for loop. It seems like the top level sum in

[sage-support] Re: slow matrix creation

2012-12-06 Thread Nils Bruin
On Thursday, December 6, 2012 2:18:45 AM UTC-8, Volker Braun wrote: I haven't checked this, but I suspect that the naive approach of making a copy of the zero matrix and then filling in the entries with set_unsafe in a loop will be faster. Yes, whoever rewrites that should by all means try

[sage-support] Re: Logical connective or

2012-12-07 Thread Nils Bruin
On Friday, December 7, 2012 6:43:37 AM UTC-8, Simon King wrote: But then: How can one combine symbolic expressions without automatic evaluation? by implementing symbolic 'and' and 'or' functions. You can already do the formal stuff: sage: function('symbolic_or') sage:

[sage-support] Re: Symbolic Calculation in Sage

2012-12-14 Thread Nils Bruin
On Friday, December 14, 2012 12:41:57 PM UTC-8, Keshav Kini wrote: Santanu Sarkar sarkar.sa...@gmail.com javascript: writes: No, as s will be a function of a,m,t, You can't have imperative code in a symbolic function, if that's what you're asking. You can of course use an imperative

[sage-support] Re: Problems with Sage multi user install

2013-01-02 Thread Nils Bruin
On Tuesday, January 1, 2013 2:31:40 PM UTC-8, mickpmack wrote: When I run sage as root it works but when I run sage as my user I get the following message: ... IOError: [Errno 13] Permission denied:

[sage-support] Re: Conversion of DifferentialForm to a Symbolic form

2013-05-08 Thread Nils Bruin
On Saturday, May 4, 2013 6:46:40 PM UTC-7, nonlinear wrote: How do I convert g to a symbolic form where dx, dy, and dz are also symbolic variables? I need to assign values to all variables via a for loop. Also, is it possible for g to be a 3x3 symbolic matrix? Thanks much, mahlon If

  1   2   3   4   5   6   >