[sage-support] Re: how to obtain an element modulo in a quotient space and how to get the lift of elements of quotient

2017-04-10 Thread Nils Bruin
Does U.lift(U.0) do the trick? It looks like (U.0).lift() (and hence lift(U.0) ) attempts to do a coordinate-wise lift, which is not what you want. It's perhaps a bug that does that. On Monday, April 10, 2017 at 12:28:12 AM UTC-7, Peng wrote: > > I compute a freemodule U=V/M, where V and M are

[sage-support] Re: how to obtain an element modulo in a quotient space and how to get the lift of elements of quotient

2017-04-10 Thread Nils Bruin
e: > > You are right! (U.0).lift() gives what I want. Thank you very much. > > By the way, do you know how to get the image in the modulo space? > > > On Monday, April 10, 2017 at 3:47:44 PM UTC+8, Nils Bruin wrote: >> >> Does U.lift(U.0) do the trick? >>

[sage-support] Re: .format of RR-element

2017-04-28 Thread Nils Bruin
Yes, clearly our reals should have __format__ support. In fact, this could work a lot better than the "%" formatting support we have now, which I think is provided by the "__float__" method. It has issues: sage: '%.60f'%(pi.n(300),) '3.141592653589793115997963468544185161590576171875000

[sage-support] Re: What is the difference between two ways to instantiate a variable?

2017-05-04 Thread Nils Bruin
On Thursday, May 4, 2017 at 4:02:11 PM UTC-7, Jim Mooney wrote: > > Why do I sometimes see just var('y') and other times see y = var('y')? The > result seems to be the same since I can use y in either case. > See the doc of SR.var and var. y=SR.var('y') is the "fundamental" construct, and assig

[sage-support] Re: QQbar and SR

2017-05-08 Thread Nils Bruin
On Monday, May 8, 2017 at 8:30:32 AM UTC-7, Marcin Kostur wrote: > > > Is it a bug or i do something wrong? ;-) > > Both. Simplify punts to Maxima and elements of QQbar don't survive the trip. The "_I" you get back isn't recognized as a square root of -1. To see things go wrong more clearly: sag

[sage-support] Re: How to send (import) any sage variable back to other software in Sage e.g. Maxima or R

2017-06-22 Thread Nils Bruin
On Thursday, June 22, 2017 at 7:40:43 PM UTC+2, kcrisman wrote: > > Just in general, you should be able to do > > f = stuff > > y = maxima(f) > > z = y._sage_() # or maybe sage(y) > Furthermore, results transferred to interfaces are assigned to variables sage: U=maxima(sin(x)) sage: U.name() 'sag

[sage-support] Re: Here is an example

2017-07-10 Thread Nils Bruin
sage has parametric_plot3d. If you read its documentation you can probably figure out how to accomplish the same result that you get from mathematica. On Monday, July 10, 2017 at 11:49:50 AM UTC+2, HG wrote: > > Hi, > This is a mathematica example, but I am not able to do something > ressembling

Re: [sage-support] cyclic algebras

2017-07-10 Thread Nils Bruin
On Monday, July 10, 2017 at 3:38:27 PM UTC+2, John Cremona wrote: > > Sage does have a function is_norm() for number field elements so the > underlying algebraic problem should be solvable. > It looks like the implementation of this routine requires a galois extension: sage: K.=NumberField(x^3

Re: [sage-support] Re: Here is an example

2017-07-10 Thread Nils Bruin
On Monday, July 10, 2017 at 2:27:10 PM UTC+2, HG wrote: > > thanks but I am trying already for a long time... I think that even > sagemanifolds is very near capacity of doing it but I am not good to make > it ! > > I don't understand the f[switch_] ;= Module part > That question might be mo

[sage-support] Re: Here is an example

2017-07-11 Thread Nils Bruin
On Monday, July 10, 2017 at 11:49:50 AM UTC+2, HG wrote: > > Hi, > This is a mathematica example, but I am not able to do something > ressembling this yin yang grid a challenger ? > https://github.com/aishenri/sage/blob/master/gridyy.pdf > the cdf and noteboob are on the same dir. > As sagemath se

[sage-support] Re: taylor(1/4*x-x^2,x,0.2,3)

2017-07-12 Thread Nils Bruin
On Wednesday, July 12, 2017 at 10:06:13 AM UTC+2, Dima Pasechnik wrote: > > > > Any idea what's going on? Looks like a Sage bug, or perhaps Sage loads > Maxima with an > option that prevents calling that 'rat' thing... > > Yes, sage does turn off the "turn floats into rational numbers" because th

[sage-support] Re: How remove deprecation warning when substituting expressions in this snippet?

2017-07-14 Thread Nils Bruin
On Saturday, July 15, 2017 at 1:21:50 AM UTC+2, Chris Seberino wrote: > > I've tried lots of variations of the following to replace a product of > functions with y. They all give the error at the bottom in Sagecell. How > fix? > > var("y") > f = function("f")(x) > g = function("g")(x) > eqtn =

[sage-support] Re: Polynomial factorization over modular ring

2017-08-15 Thread Nils Bruin
On Tuesday, August 15, 2017 at 7:21:03 AM UTC-7, chandra chowdhury wrote: > > Is it possible to factor polynomials completely over modular ring? > > Like > x = var('x') > factor(x^5-x, IntegerModRing(25)['x']) > gives > > (x-1)*(x+1)*(x^2+1)*x > The second argument is simply ignored here, by the

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

2017-09-15 Thread Nils Bruin
On Friday, September 15, 2017 at 8:38:37 AM UTC-7, Simon King wrote: > > > Unfortunately, the transition from libgap to Sage is very > slow: Reading the data into libgap takes 16 seconds, > translating the data to Sage takes 3 minutes. Most of that > time is used for the transformation of the ma

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

2017-09-20 Thread Nils Bruin
On Tuesday, September 19, 2017 at 10:45:06 PM UTC-7, Yann Cargouet wrote: > > Hi Simon, > > Thank you for your answer, I will try the Ansatz and comparison of > coefficients. > To find coefficients a, b, and c I tried to solve a system of three > equations but unfortunately it doesn't work. The s

Re: [sage-support] Memory leak in loops (SageMath 8.1)

2017-12-15 Thread Nils Bruin
On Friday, December 15, 2017 at 6:51:37 AM UTC-8, Marco Caselli wrote: > > Thank you very much for your prompt replies. I was sure that range(n) > creates an iterator instead of the list itself, my bad. > In any case, even if the function is creating this list, why is it still > stored in memory

Re: [sage-support] Memory leak in loops (SageMath 8.1)

2017-12-18 Thread Nils Bruin
On Monday, December 18, 2017 at 7:48:34 AM UTC-8, Marco Caselli wrote: > > > So there is a discrepancy between the real amount of memory in use and the > one allocated but, when I run a process, my hardware limits the allocated > one. So, for instance, I can evaluate ex_f(p) just for very small v

Re: [sage-support] Memory leak in loops (SageMath 8.1)

2017-12-22 Thread Nils Bruin
On Friday, December 22, 2017 at 3:07:13 AM UTC-8, Marco Caselli wrote: > > > > Il giorno lunedì 18 dicembre 2017 17:37:48 UTC+1, Nils Bruin ha scritto: >> >> If your routine f_ex runs out of memory then that would indicate a memory >> leak. If you look at the code fo

[sage-support] Re: Bug report: Kernel dies after 1 hour while dividing polynomials

2018-02-06 Thread Nils Bruin
On Monday, February 5, 2018 at 9:11:44 AM UTC, Patrick Reichert wrote: > > I want to submit an *error report* for SAGE 7.0 and 8.0: > > The division of two polynomials in an ideal causes an *kernel death* > after one hour of computation. > Singular performs the calculation in about *one second*. >

[sage-support] Re: Is this a bug?

2018-03-05 Thread Nils Bruin
On Wednesday, February 28, 2018 at 8:00:34 AM UTC, Simon King wrote: > > So, we have two x with different roles. It would make sense to disallow > the creation of such rings. > > -1. It would mean any structure with named generators would have to go dig into the tower that defines it base to che

Re: [sage-support] Re: Is this a bug?

2018-03-05 Thread Nils Bruin
On Wednesday, February 28, 2018 at 2:42:26 PM UTC, Ralf Stephan wrote: > > It might not be necessary to (re)assign the global variable. Only if the > user wants to do operations with the polynomial he wants an x to be that > poly variable, and certainly not another x. So, the parser can do the pa

[sage-support] Re: [sage-cell] Where Oh Where is my Divide By Zero Error?

2018-03-20 Thread Nils Bruin
On Friday, March 16, 2018 at 7:27:41 PM UTC-7, Andrey Novoseltsev wrote: > > On Fri, Mar 16, 2018 at 4:18 PM, Jorge Garcia > wrote: > > Dear Hive Mind: > > > > Why is there no Divide By Zero Error here: > > > http://sagecell.sagemath.org/?z=eJwljkELgkAUhO-C_2GiAtek1kuX2Eu4pBc3NjEqCqQ2E-QlpvX3

[sage-support] Re: Cython in jupyter notebook

2018-04-15 Thread Nils Bruin
On Sunday, April 15, 2018 at 7:11:06 AM UTC-7, Simon King wrote: > > Hi! > > The following cython code compiles fine in SageMath command line version > and it *used* to compile fine in the jupyter notebook one year ago: > > cython(""" > def mantisse(): > cdef double a = 1 > cdef d

[sage-support] Re: Cython in jupyter notebook

2018-04-15 Thread Nils Bruin
Problems like this have been encountered before. This seems to work around problems in the other direction (i.e., let Jupyter deal with an actual file rather than one of its streams): https://stackoverflow.com/questions/34145950/is-there-a-way-to-redirect-stderr-to-file-in-jupyter The quickest

[sage-support] Re: Right way to kill notebook server on single-user machine

2018-04-25 Thread Nils Bruin
When you start up the jupyter notebook it writes some files describing its state. On Fedora, they end up in in /run/user//jupyter. There's a file there nbserver-.json. In the file you'll find some basic data about the server, including the "pid", which also appears in the filename. executing k

[sage-support] Re: 500: Internal server error when I access the data files

2018-05-03 Thread Nils Bruin
On Thursday, May 3, 2018 at 7:14:32 AM UTC-7, Francisco de Arriba wrote: > > We can try to move into Jupyter. But we found two new problems, how can we > do to start a Jupyter server for multiple users accounts (using a command > line like in notebook(accounts=True)) > The standard solution is J

[sage-support] Re: Right way to kill notebook server on single-user machine

2018-05-03 Thread Nils Bruin
On Thursday, May 3, 2018 at 2:32:22 PM UTC-7, Tevian Dray wrote: > > Finally had a chance to test this; yes it works -- although it is > apparently possible to send the two kill commands too close together. Thank > you very much. Have to say it's a bit of a kluge, though -- the design > assumpt

[sage-support] Re: editor for sage commands

2018-05-19 Thread Nils Bruin
On Saturday, May 19, 2018 at 10:26:35 AM UTC-7, Francesco wrote: > > > Il giorno sabato 19 maggio 2018 18:58:29 UTC+2, Francesco ha scritto: >> >> Can you tell me a good editor for sage shell commands ? I try Texmacs, >> but it crashes. >> I have kubuntu 18.04 64bit and the version of sage in the

[sage-support] Re: A "remote sage kzernel" in the Jupiter notebook ?

2018-05-25 Thread Nils Bruin
On Friday, May 25, 2018 at 5:59:55 AM UTC-7, Emmanuel Charpentier wrote: > > Dear list, > > [ This goes to sage-support becaus I do not know if this is already > possible with our current kernel. Please redirect to sage-devel if you > think it more appropriate... ] > > Re-hashing the SageTeX doc

[sage-support] Re: A "remote sage kzernel" in the Jupiter notebook ?

2018-05-25 Thread Nils Bruin
On Friday, May 25, 2018 at 1:24:39 PM UTC-7, Volker Braun wrote: > > On Friday, May 25, 2018 at 7:02:19 PM UTC+2, Nils Bruin wrote: >> >> Since your approach requires the device to run ssh, a much more portable >> option is to run the jupyter server on the remote machine a

[sage-support] Re: A "remote sage kzernel" in the Jupiter notebook ?

2018-05-25 Thread Nils Bruin
On Friday, May 25, 2018 at 3:33:47 PM UTC-7, Volker Braun wrote: > > I'm not saying anything against ssh tunnel. Though running jupyter > remotely with a self-signed cert and authentication with a fixed token > handles network disconnect/reconnects better... > Would you have particular words to

Re: [sage-support] Re: Where is (the) kash?

2018-07-10 Thread Nils Bruin
On Tuesday, July 10, 2018 at 6:01:39 PM UTC-7, Kwankyu wrote: > > https://trac.sagemath.org/ticket/22982 (a meta-ticket where kash is a >> part of) >> > > Not at all! This is a native implementation of global function fields in > Sage. > That is wonderful! Note that most parts of the function fi

[sage-support] Re: How to find the normal for of an elliptic curve using Sage?

2018-08-02 Thread Nils Bruin
On Thursday, August 2, 2018 at 8:58:04 AM UTC-7, jianrong wrote: > > Dear All, > > Let $C$ be the following curve in $\mathbb{C}^2$. > \begin{align} > & 11664 {c_1}^3 {c_2}^2 + 536544 {c_1}^3 c_2 + 6170256 {c_1}^3 + 67068 > {c_1}^2 {c_2}^2 + 1542564 {c_1}^2 c_2 \\ > & + 3085128 c_1 {c_2}^2 - 32393

[sage-support] Re: Deleting all zero rows in a matrix

2018-10-02 Thread Nils Bruin
On Tuesday, October 2, 2018 at 12:56:54 AM UTC-7, jamison...@vanderbilt.edu wrote: > > > How can I delete the all zero rows (rows 2 and 3) for > > all any entry of a matrix. I tried the for loop below, but it > > doesn't store any of the values and only gives one lines. Please Help! > > > If you k

[sage-support] Re: using parallel & fork decorators with timeout

2018-10-25 Thread Nils Bruin
On Thursday, October 25, 2018 at 7:13:26 AM UTC-7, John Cremona wrote: > > sage: for res in apply([f,g]): print res; break > (((,), {}), 3^2 * 12248508919 * > 263416276811813669131602539468011) > > The first bit of the output shows that it is f which returns the result. > But I don't know if g s

[sage-support] Re: using parallel & fork decorators with timeout

2018-10-25 Thread Nils Bruin
On Thursday, October 25, 2018 at 9:12:56 AM UTC-7, Nils Bruin wrote: > > On Thursday, October 25, 2018 at 7:13:26 AM UTC-7, John Cremona wrote: >> >> sage: for res in apply([f,g]): print res; break >> (((,), {}), 3^2 * 12248508919 * >> 2634162768118136691316025394680

Re: [sage-support] plot3d doesn't work in jupyterlab / jupyter notebook

2018-11-18 Thread Nils Bruin
It depends a little bit on how you install the sage kernel into your jupyter notebook server, but chances are you have to do some extra work to install some notebook extensions. In the sage install, in "/local/share" there are 3 subdirs "jsmol, "mathjax", "threejs". These need to be findable as

[sage-support] Re: Function defined with matrices won't plug in values for function

2018-11-30 Thread Nils Bruin
On Friday, November 30, 2018 at 1:59:40 PM UTC-8, saad khalid wrote: > > However, when I try to compute this h(.1), the function doesn't plug in .1 > in for s in the function, and it returns: > > [ s + 1 0] > [ 0 -s + 1] > > > What exactly is happening? > > The problem is that a matrix ov

[sage-support] Re: dynamic variable names

2018-12-01 Thread Nils Bruin
On Saturday, December 1, 2018 at 3:36:55 PM UTC-8, Tevian Dray wrote: > > How can I create variable names programmatically, then assign values to > them? > > Python doesn't make that particularly easy, and it also doesn't make accessing variables thus created particularly easy. I suspect the app

[sage-support] Re: Function defined with matrices won't plug in values for function

2018-12-02 Thread Nils Bruin
On Sunday, December 2, 2018 at 10:22:25 AM UTC-8, saad khalid wrote: > > I appreciate the help with solving my problem, though I do have some > comments/questions to make with regard to usability for new users: > > Why can't matrices be allowed in SR in a nontrivial way? > >From a mathematical po

[sage-support] Re: attaching files in a jupyter notebook

2018-12-12 Thread Nils Bruin
I would expect magic commands to work a little differently in the jupyter gui than on the command line, so the possibility for an error doesn't surprise me too much. It can probably be fixed. However, a straight-up "attach('')" would hopefully work? It still needs to hook into the REPL to actua

[sage-support] Re: Function defined with matrices won't plug in values for function

2018-12-15 Thread Nils Bruin
On Wednesday, December 5, 2018 at 10:15:52 AM UTC-8, saad khalid wrote: > > Thank you all for the thoughtful responses, your comments helped me a lot. > One last bit of trouble that I've been having related to this topic. This > was is the code I was running: > > Mz = matrix([[0,1],[1,0]]) > Mx =

[sage-support] Re: taylor versus series

2018-12-30 Thread Nils Bruin
Looking at the implementation, it seems that the ".series" method uses Pynac/Ginac series. A little experimentation seems to suggest that this is not properly wrapped. If we break up the expression in small parts and see how series expansions of the different components combine, we get inconsis

[sage-support] Re: taylor versus series

2018-12-30 Thread Nils Bruin
On Sunday, December 30, 2018 at 10:30:53 AM UTC-8, Peter Luschny wrote: > > > In the mean time, you can accomplish your computations without using SR: > > sage: R.=QQ[[]] > > sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) > > 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + ... > > Does this only work in i

[sage-support] Re: Loading heavy computations

2019-01-17 Thread Nils Bruin
On Thursday, January 17, 2019 at 3:37:36 PM UTC-8, Enrique Artal wrote: > > I made some computations, I skip the details for now, but the result was a > rational function with rational coefficients and 13 indeterminates. The > computation took around three hours and used a lot of memory so I made

[sage-support] Re: Loading heavy computations

2019-01-22 Thread Nils Bruin
Thank you for such a detailed description. I think this is a good basis for an enhancement ticket. I don't think there is a fundamental reason why polynomial construction from a dictionary shouldn't do something efficient itself already. As an example of the kind of code we can benchmark on: sa

[sage-support] Re: Loading heavy computations

2019-01-22 Thread Nils Bruin
See: https://trac.sagemath.org/ticket/27091 Balanced summing (which you are basically doing) already makes a bit of a difference. If that's indeed the issue then using a balanced summing strategy already gives a better order on the algorithm. -- You received this message because you are subsc

Re: [sage-support] Getting Live Data

2019-02-05 Thread Nils Bruin
On Tuesday, February 5, 2019 at 3:14:56 AM UTC-8, Ingo Dahn wrote: > > See > http://doc.sagemath.org/html/en/reference/finance/sage/finance/stock.html. > I'd be interested in any alternative source for live data for use in > statistics classes. > > Haven't used it so I can't vouch for the qualit

[sage-support] Re: maximal integrals

2019-02-19 Thread Nils Bruin
On Tuesday, February 19, 2019 at 2:04:54 PM UTC-8, slelievre wrote: > > but how does one get information in a Maxima session about settings > such as besselexpand, display2d, domain, keepfloat, > These are just global variables, so "display2d;" will give you the value. > and loaded > modules su

[sage-support] Re: simplification options

2019-03-11 Thread Nils Bruin
On Monday, March 11, 2019 at 11:05:04 AM UTC-7, Michael Beeson wrote: > > I appreciate Eric's post, and I do use subs sometimes, but it makes me > nervous since > it will happily substitute any old thing you tell it to, even an > incorrect thing. So, if your idea > is to check a computatio

[sage-support] Re: A case of immaculate conception...

2019-03-19 Thread Nils Bruin
On Tuesday, March 19, 2019 at 4:52:19 AM UTC-7, Emmanuel Charpentier wrote: > > Defining a symbolic function seems to declare its arguments. Is this > expected ? > It's certainly explicit programmed: sage: preparse("f(x)=1") '__tmp__=var("x"); f = symbolic_expression(Integer(1)).function(x) On t

[sage-support] Re: A case of immaculate conception...

2019-03-20 Thread Nils Bruin
On Wednesday, March 20, 2019 at 4:37:49 AM UTC-7, Emmanuel Charpentier wrote: > > But I wont, because I tend to think that, as long as we are insisting on > explicit creation of symbolic variables, > An argument that has been used in that context is that in "f(x)=sin(x)" the `x` does occur on t

[sage-support] Re: Can Sage determine the Residue of a pole of symbolic order, i.e. exp(-z)/z^n?

2019-04-02 Thread Nils Bruin
On Tuesday, April 2, 2019 at 7:36:32 AM UTC-7, Christopher Duston wrote: > > I have been doing a demo of Maple, and have run into something it cannot > do that I need for my work. I thought I would toss it over here, and see if > Sage can do it. > > I want to determine the residue of integrals of

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-10 Thread Nils Bruin
On Wednesday, April 10, 2019 at 11:19:22 AM UTC-7, Daniel Friedan wrote: > > However, disconnecting my browser from a remote jupyter notebook aborts > the calculation. > > That shouldn't need to happen. Jupyter notebook has configuration options for killing "idle" notebooks (for various form of "

[sage-support] Re: Sorting a list of variables

2019-04-21 Thread Nils Bruin
sorted(L, key=lambda v: (v[:1],int(v[1:]))) would do the trick. In general, you could look at something like https://pypi.org/project/natsort/. It might be able to make a more natural sortkey in more examples (in general, the idea would be to split your string in alphabetic and numerical substr

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 5:56:42 AM UTC-7, Daniel Friedan wrote: > > The kernel is still running. The problem is not the culling of idle > notebooks. > > When I close the browser tab and then reopen the notebook, the kernel is > still running but output is lost and output from ongoing calcul

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 11:13:23 AM UTC-7, Daniel Friedan wrote: > > One of the advantages of SageMath over Mathematica is SageMath's ability > to run a remote notebook without continuous network connection. The > Mathematica remote kernel requires continuous connection. It's sad that > S

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 12:31:14 PM UTC-7, John H Palmieri wrote: > > If you're willing to use the Sage command-line interface rather than the > notebook, then you might try the "screen" program, which should already be > installed on linux or Mac OS X. > And for graphical interfaces, "xpra

Re: [sage-support] Re: Computing a Groebner Basis (singular algorithm) raises an error

2019-05-27 Thread Nils Bruin
On Monday, May 27, 2019 at 11:40:00 AM UTC-7, Tracy Hall wrote: > > Thanks for the reply. That's disappointing—I'm not crazy about the idea of > spawning a hundred million Sage processes, most of them to do about 1/50th > of a second's worth of calculation, just because a few of them will need to

[sage-support] Re: compute regulator of quadratic field

2019-07-24 Thread Nils Bruin
On Wednesday, July 24, 2019 at 7:43:10 AM UTC-7, Michael Beeson wrote: > > SageMath has built-in functions to compute the regulator and the > fundamental unit of a quadratic field. The regulator of a quadratic field > is the log of the absolute value of the fundamental unit. > So, the follow

[sage-support] Re: Sage equivalent for GP's "padicappr"?

2019-08-01 Thread Nils Bruin
Is this what you're looking for? sage: Qp=pAdicField(7) sage: g=Qp['x'](x^2-2) sage: g.hensel_lift(4) You can use pari rather directly; relying on sage converting its data types to appropriate pari types: pari(g).padicappr(Qp(4)) -- You received this message because you are subscribed to the

Re: [sage-support] Re: Sage equivalent for GP's "padicappr"?

2019-08-02 Thread Nils Bruin
> > Questions: > > Do Qp(7) and pAdicField(7) do the same thing? > Yes, I think so. They also accept arguments to set things like default precision for that ring. > K[x] and K['x'] seem to do the same thing as well. Is that right? > Yes, they do. `x` is predefined as a symbolic variable. `K

[sage-support] Re: power series and strings for p-adics

2019-08-08 Thread Nils Bruin
On Thursday, August 8, 2019 at 7:16:21 AM UTC-7, Fernando Gouvea wrote: > > In certain contexts, I'd like to work in the power series mode up until > the end, but display my answer in digits mode. The only way I know how to > do this is to find the answer w and then use answer=Kd(w) to turn it

[sage-support] Re: How change request for my Sage mirror domain?

2019-08-16 Thread Nils Bruin
On Friday, August 16, 2019 at 6:41:18 PM UTC-7, John McGahey wrote: > > Hi all, > I want to change my mirror domain from sage.asis.io to sage.asis.sh. I > don't know here is the right place to ask this question or not. but please > help me. > My request is changing IO --> SH. > Very thanks > _fac

Re: [sage-support] Re: Tracking memory usage and time

2019-09-03 Thread Nils Bruin
On Tuesday, September 3, 2019 at 2:43:27 AM UTC-7, Jori Mäntysalo (TAU) wrote: > > There is also at least %mprun magic. Googling that will give you some > examples. > > Looking at the memory footprint of the entire process (as a function of time) gives some indication of memory use of a certa

[sage-support] Re: Loading a sage worksheet inside a notebook

2019-10-11 Thread Nils Bruin
On Friday, October 11, 2019 at 5:23:15 AM UTC-7, cyrille piatecki wrote: > > Hello, > > dispite all my effort under windows 10, I am not able to load any > notebook inside a current notebook with the command load(). I hav tried > "c://..." c:/..." "c:\\...". From this I cannot explain to sage th

[sage-support] Re: Sage cell server file input

2019-10-22 Thread Nils Bruin
On Tuesday, October 22, 2019 at 8:52:44 AM UTC-7, david.guichard wrote: > > I have a cocalc sage worksheet that reads data from a csv file. Is there > any way to do this in the single cell server, that is, read data from an > external file? I'm guessing not, but it would be handy. > Accessing a

[sage-support] Re: Sage cell server file input

2019-10-24 Thread Nils Bruin
On Tuesday, October 22, 2019 at 1:36:24 PM UTC-7, david.guichard wrote: > > Thanks for the suggestion, but it doesn't appear to work for me. My code is > > csv.reader(open('http://myserver/xxx.csv')) > > I don't think python's standard "open" supports opening URLs. You need something like urllib.r

[sage-support] Re: Possible bug in integrate ?

2019-10-25 Thread Nils Bruin
Yes, that's a bug. It happens in F(x).operator()._tderivative_ It differentiates the bounds in case those vary with the differentiation variable, and that does not work for "0". If you define var('y') F(x)=integrate(f(t),y,x) you get the right result (with y not being a function of t). The bou

[sage-support] Re: Possible bug in integrate ?

2019-10-25 Thread Nils Bruin
On Friday, October 25, 2019 at 3:27:42 AM UTC-7, Emmanuel Charpentier wrote: > > Thanks a lot ! That's perfectly clear... > > Any hints on how to file a ticket for this issue ? > > The minimal example excellently shows the problem, so including that would be great. It's easy to find the problemati

Re: [sage-support] Re: sage building with python3

2019-11-04 Thread Nils Bruin
On Monday, November 4, 2019 at 10:27:02 AM UTC-8, Dima Pasechnik wrote: > > Incidentally this brings up the question on how one should deal with > outdated (as they had to by Python2-compatible) > Sage's iPython and Jupyter. > > What has worked for me for a long time is to install the sage ipyt

Re: [sage-support] Re: sage building with python3

2019-11-04 Thread Nils Bruin
On Monday, November 4, 2019 at 2:53:18 PM UTC-8, Dima Pasechnik wrote: > > Is Sage Jupyter kernel pipe-based? > (Jupyter uses zeromq, which can do inproc communication, and as far as I > know some kernels do this) > > Oh sorry. Perhaps. I didn't investigate. I'd expect that the jupyter ipython ke

[sage-support] Re: Symbolic inverse in finite field

2019-11-07 Thread Nils Bruin
On Thursday, November 7, 2019 at 7:50:00 AM UTC-8, Subrata Nandi wrote: > > > > On Thursday, November 7, 2019 at 9:13:17 PM UTC+5:30, Subrata Nandi wrote: >> >> Thanks Emmanuel Charpentier for your reply. But the entry of my matrix >> is only symbolic variables. For example I am giving one short m

[sage-support] Re: Deprecation warning for a Sage interact

2019-12-21 Thread Nils Bruin
The problem is fairly subtle, but it boils down to the fact that input_box wants a *string* as default value , because a string is also what it gets from the user. Note that your names x and y are bound to x(t) and y(t) respectively. Input box turns its default parameter to a string, so the exp

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Nils Bruin
On Tuesday, January 14, 2020 at 5:36:27 AM UTC-8, Александр Ватузов wrote: > > Now I constantly know, that problem was in using > > divmod(n, base**half) > > instead of > > n // (base**half), n % (base**half) > The second option yields a performance regression relative to the first, because you w

[sage-support] Re: sage 9.0: mismatch in sr-to-maxima translation

2020-01-18 Thread Nils Bruin
On Saturday, January 18, 2020 at 7:19:03 AM UTC-8, mendes wrote: > > > RuntimeError: Encountered operator mismatch in sr-to-maxima translation > > The error indicates that the sage-to-maxima dictionary used in sr_to_max is in an inconsistent state. Its state is a mix of preinitialization and cach

[sage-support] Re: sage 9.0: mismatch in sr-to-maxima translation

2020-01-19 Thread Nils Bruin
You should file a ticket. Symbols are getting mixed up. Recently there were some changes to the order in which different integration algorithms are used, and I suspect that this happens as a side effect. I can tell you what I see happen: This is what the actual "unit_step" function should be.

[sage-support] Re: sage 9.0: mismatch in sr-to-maxima translation

2020-01-20 Thread Nils Bruin
On Sunday, January 19, 2020 at 6:46:50 AM UTC-8, mendes wrote: > > #But, for t>1, there is a RuntimeError: mismatch in sr-to-maxima > var('x,t') > assume(1 f=unit_step(t-1) > g=t > fg = integrate(f(t=x)*g(t=t-x),x,0,t).simplify_full().expand() > show(fg) > forget() > > In the meantime, you can, as

[sage-support] Re: Endomorphism Rings of Elliptic Curves

2020-01-21 Thread Nils Bruin
On Tuesday, January 21, 2020 at 5:23:43 PM UTC-8, Eric Zhu wrote: > > Is there a way to get the endomorphism ring of an elliptic curve in Sage? > with d=E.cm_discriminant() you know that End(E) is the cm order of discriminant d. If E does not have cm, then End(E)=Z -- You received this me

[sage-support] Re: defining symbolic function

2020-02-22 Thread Nils Bruin
http://doc.sagemath.org/html/en/reference/calculus/sage/calculus/var.html#sage.calculus.var.function -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support

[sage-support] Re: defining (partial) inverse image of a ring homomorphism

2020-03-10 Thread Nils Bruin
On Tuesday, March 10, 2020 at 6:22:45 AM UTC-7, Dima Pasechnik wrote: > > Suppose I have > > R.=QQ[] > K.=QQ[] > f=R.hom([u*v,u^2,v^2-u^2]) > > then for any even degree p in K one can compute > a preimage under f (e.g. u^4-u*v goes to y^2+x, etc) > I think the general way (which should be pr

[sage-support] Re: Sage functions arenot accepted by scipy fsolve

2020-04-10 Thread Nils Bruin
On Friday, April 10, 2020 at 1:02:12 AM UTC-7, Ne reknu wrote: > > Hello. > I need a root finder of a real function which work with a initial guess. > That can be done by scipy fsolve, but if I try to aply it on a gamma (or > Bessel) function in Sage, I recieve following error message: > > NotIm

[sage-support] Re: Sage functions arenot accepted by scipy fsolve

2020-04-10 Thread Nils Bruin
On Friday, April 10, 2020 at 1:05:15 PM UTC-7, Ne reknu wrote: > > Thank you for your answer. Unfortunatelly the numpy.vectorize(Rce) > generates the very same error (I tried to plot it). Or pehaps I > misunderstood your intention? > No, my guess would have been that would work, but then appare

[sage-support] Re: Change default power operator output to '**' rather than '^' .

2020-05-01 Thread Nils Bruin
On Friday, May 1, 2020 at 12:30:10 PM UTC-7, John Atom wrote: > > If I define a function: > > f(x) = x**2 > > and then print it, sage always prints it as `x^2`. > > Is it possible to change the default output of the power operator to '**' > ? > I suspect it will be hard, because these "^" are

Re: [sage-support] space sign in 'show'

2020-06-18 Thread Nils Bruin
On Thursday, June 18, 2020 at 12:18:40 AM UTC-7, Dima Pasechnik wrote: > > > Python's print() function allows you to do formatting, whereas show() is > just a quick hack. > > little correction here: python's strings allow you to do formatting, meaning that whatever formatting you want to do, you

[sage-support] Re: Jupyter kernels for R, gp, gap, etc

2020-08-03 Thread Nils Bruin
On Monday, August 3, 2020 at 9:26:38 PM UTC-7, Tim McLarnan wrote: > > I tried copying the kernel folders from CoCalc and editing them in what I > thought was the right way and putting them with the kernel folders on my > machine. This produced kernels that show up in Jupyter, but that don't >

[sage-support] Re: Reduction over Ideal

2020-08-05 Thread Nils Bruin
On Wednesday, August 5, 2020 at 4:28:42 AM UTC-7, Santanu wrote: > > Dear all, > Consider ideal I= over the binary field GF(2). > Then (x2).reduce(I) gives x2. I want it to be x0*x1. > In fact , I want this kind of reduction always should give quadratic > polynomial > (I know that this is p

[sage-support] Re: Reduction over Ideal

2020-08-05 Thread Nils Bruin
On Wednesday, August 5, 2020 at 10:19:57 AM UTC-7, john_perry_usm wrote: > > > It's possible that you want a local term ordering. Unlike global term > orderings, in a local ordering 1>t for any monomial t. > > TO = TermOrder("negdegrevlex",3) > R = PolynomialRing(GF(2),'x',3,order=TO) > R.inject_v

Re: [sage-support] Subgroups of subgroups aren't subgroups?

2020-08-16 Thread Nils Bruin
On Sunday, August 16, 2020 at 4:22:22 AM UTC-7, Dima Pasechnik wrote: > > > I guess this has to do with Python hashing; objects are not checked > for `==` equality when you do {}, > but for equality w.r.t. to certain internal representation: > sage: g = libgap.SymmetricGroup(3) > sage: x = g.Su

[sage-support] Re: Loading an object containing a matrix that was saved in Python 2 sage

2020-08-19 Thread Nils Bruin
On Wednesday, August 19, 2020 at 5:24:48 AM UTC-7, Paul Leopardi wrote: > > See also > https://groups.google.com/g/sage-support/c/3WKui-LojKs/m/DgEPBGF3AQAJ and > https://trac.sagemath.org/ticket/28444 > > On Wednesday, 19 August 2020 at 22:17:40 UTC+10 Paul Leopardi wrote: > >> Hello, >> I am cu

[sage-support] Re: You've been approved for GitHub Sponsors

2020-08-28 Thread Nils Bruin
Thank you for setting this up! It looks like a very generous move from GIthub to run the donation collection infrastructure and still give 100% to the sponsored party. I think people might be more inclined to donate if it were clearer where the money went. Is it the intention that this money go

Re: [sage-support] Re: You've been approved for GitHub Sponsors

2020-08-28 Thread Nils Bruin
On Friday, August 28, 2020 at 10:36:20 AM UTC-7, Dima Pasechnik wrote: > > technically, money goes to a registered charity Open Collective, which > takes a 10% cut for admin etc costs (and Stripe takes a cut, too) and gives > the rest to us. At least the setup is very easy - noone had time so far

[sage-support] Re: Sage cells

2020-09-10 Thread Nils Bruin
On Thursday, September 10, 2020 at 6:50:11 AM UTC-7, cyrille piatecki wrote: > > > I would like to know is there is a way to centerr results in SageCells. > I'd expect that with a cunning use of CSS style sheets, you can pretty much change any aspect of the formatting. It would require that you e

[sage-support] Re: factorial

2020-11-29 Thread Nils Bruin
With the current regexp-based rewriting we'd need a pattern of the kind '!' -> 'factorial( '**" but that's very basic and doesn't need any context. To change an implicit unary postfix operator to an explicitly parenthesized prefix operator need almost complete parsing. Had the factorial been ex

Re: [sage-support] Re: factorial

2020-11-30 Thread Nils Bruin
On Sunday, November 29, 2020 at 1:23:36 PM UTC-8 list...@gmail.com wrote: > > I agree with you, but at the same time I wonder what would be wrong with > replacing > '!' → '.factorial()' > > Good observation: python already has postfix operators! I still don't like factorial notation; not even i

[sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-24 Thread Nils Bruin
I suspect you want to collect wrt. the second partial derivatives of f(x,y,z,t) with respect to x,y,z,t ; evaluated at xp,yp,zp,tp. Those are not the same as the partial second derivatives of f(xp,yp,zp,tp) with respect to (x,y,z,t). If you inspect what derivative(f(xp, yp, zp, tp), x, 2) gives

Re: [sage-support] Calling Words in a function gives an error

2021-01-24 Thread Nils Bruin
On Thursday, January 21, 2021 at 7:21:52 AM UTC-8 Nikos Apostolakis wrote: > Dear Vincent, > > Thank you very much, that fixes it. > > IMHO this is a bug though, or at least an inconsistent behavior. Most of > the time Sage silently coerces things to the appropriate type so commands > just wor

Re: [sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-25 Thread Nils Bruin
On Monday, January 25, 2021 at 7:16:00 AM UTC-8 ... wrote: > Is this the same as derivative(f(xp(x, y, z, t), yp(x, y, z, t), zp(x, y, > z, t), tp(x, y, z, t)) , x, 2)? > > No, it is not. Look up "Multivariable Chain rule". -- You received this message because you are subscribed to the Google G

Re: [sage-support] Calling Words in a function gives an error

2021-01-25 Thread Nils Bruin
On Monday, January 25, 2021 at 7:09:32 AM UTC-8 Nikos Apostolakis wrote: > Dear Nils, > > [...] I think treating rational integers as integers is safe. Actually > Sage does that > > sage: 8/2 in ZZ > True > > > So to have a function with integer input throw an error when you feed it a > rationa

[sage-support] Re: How to get the symbolic expression of eigenvalues and eigenvectors of this 3x3 real symmetric matrix

2015-01-21 Thread Nils Bruin
On Wednesday, January 21, 2015 at 10:56:29 AM UTC-8, Jon wrote: > > Hi all, I used the following code in notebook but it fails to give > results. Any suggestions? > > var('a11,a12,a13,a14,a15,a16,a22,a23,a24,a25,a26,a33,a34,a35,a36,a44,a45,a46,a55,a56,a66,p,q,r', > > domain='real') > g11=a11*p*p

  1   2   3   4   5   6   >