[sage-support] Re: Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-08 Thread Nils Bruin
If you run `jupyter --paths` and `sage -sh <<<"jupyter --paths"` you see the difference in paths. The relevant ones for you are probably the sage-specific ones $SAGE-LOCAL/var/lib/sage/venv-python3.10/share/jupyter Whatever is there will get picked up by sage's jupyter but, naturally, not by

Re: [sage-support] Antisymmetry Definition in SageMath for DiGraphs

2024-03-18 Thread Nils Bruin
On Monday 18 March 2024 at 06:45:17 UTC-7 Hellen Colman wrote: "A graph represents an *antisymmetric relation* if ... " It is not saying a graph is antisymmetric, but is introducing a new definition of antisymmetric relation. Ah, indeed! The person must have been interested in transitive

Re: [sage-support] Antisymmetry Definition in SageMath for DiGraphs

2024-03-15 Thread Nils Bruin
On Friday 15 March 2024 at 15:08:34 UTC-7 Hellen Colman wrote: Let me just clarify the main point of his question just in case we can still obtain a helpful answer. Essentially the question is: Why is Sage calling "antisymmetric" to a property that is not the standard antisymmetric property?

Re: [sage-support] bug in plot?

2024-03-15 Thread Nils Bruin
On Friday 15 March 2024 at 12:42:49 UTC-7 kcrisman wrote: Or rather, should the default be useoffset False? Yes, I think that would be reasonable to do. Clearly, offsets being used without the user knowing they exist can easily lead to confusion and misinterpreting the graph, as had been

Re: [sage-support] bug in plot?

2024-03-14 Thread Nils Bruin
I get the impression that without setting ymin,ymax you just end up with a tiny range for the y-axis and its labelling is just very weird. I think the labels displayed are shifted and scaled. So the error is just how the labels are printed. That looks the same as

[sage-support] Re: Question related to Sagemath permission on Github

2024-01-22 Thread Nils Bruin
On Sunday 21 January 2024 at 04:25:42 UTC-8 Juan Grados wrote: To protect the repo from arbitrary deletion, I need to know if Github allows adding a rule to avoid a repository being deleted by a single person. If you encourage a workflow with forks and pull requests then everybody will have

Re: [sage-support] Re: limitations of "solve"?

2024-01-01 Thread Nils Bruin
The documented effect is usually of most impact: https://maxima.sourceforge.io/docs/manual/maxima_46.html#index-domain there may be other undocumented effects, but the one above tends to explain a lot already. On Sunday 3 December 2023 at 06:26:20 UTC-8 Oscar Benjamin wrote: > What does "set

Re: [sage-support] smith form may be too slow

2023-12-13 Thread Nils Bruin
(side note: Q is generally considered a PID, but indeed it makes little sense worrying about Smith normal form over it) Concerning the slow performance: from the documentation, R._matrix_smith_form would allow an optimized routine to kick in. That doesn't exist, though. ZZ doesn't have it

Re: [sage-support] Re: Canonical divisor help

2023-10-29 Thread Nils Bruin
On Monday, 30 October 2023 at 00:19:47 UTC+13 Kwankyu wrote: What is your code? P2. = ProjectiveSpace(QQ, 2) f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5 C = Curve(f) kC = C.function_field() D = kC(kC.base_field().gen(0)).differential().divisor() L,m,s =

Re: [sage-support] Re: ideal intersection in ZZ

2023-10-29 Thread Nils Bruin
On Monday, 30 October 2023 at 00:26:55 UTC+13 G. M.-S. wrote: If I understand you correctly, SageMath is a bit loose at the moment about its categories. That's not what I meant also not what is indicated by what I noticed: by the looks of it, sage does know about euclidean domains and has

Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 18:50:12 UTC-7 Nils Bruin wrote: On Saturday, 28 October 2023 at 15:26:35 UTC-7 Kwankyu wrote: f1, f2, f3 are univariate polynomials (say in y) over rational function field (say in x). Then x and y are not always the variables X and Y of the coordinate ring

Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 15:26:35 UTC-7 Kwankyu wrote: f1, f2, f3 are univariate polynomials (say in y) over rational function field (say in x). Then x and y are not always the variables X and Y of the coordinate ring of the affine plane. Things are more complicated if the curve is in

Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 05:39:26 UTC-7 Kwankyu wrote: I looked the Magma code in ask.sagemath. There's no problem in computing a canonical divisor for the curve (through the attached function field). Computing a basis of the Riemann-Roch space is no problem as well. Actually the hard

Re: [sage-support] Re: ideal intersection in ZZ

2023-10-28 Thread Nils Bruin
ee ZZ-modules of rank 1 would also get you the right behaviour. Guillermo On Sat, 28 Oct 2023 at 18:44, Nils Bruin wrote: I'm sure its omission is just an oversight. For fractional ideals in number fields it is defined: sage: K.=QuadraticField(7) sage: I=K.fractional_ideal(5) sage

[sage-support] Re: ideal intersection in ZZ

2023-10-28 Thread Nils Bruin
I'm sure its omission is just an oversight. For fractional ideals in number fields it is defined: sage: K.=QuadraticField(7) sage: I=K.fractional_ideal(5) sage: J=K.fractional_ideal(3) sage: I.intersection(J) Fractional ideal (15) I doubt that just knowing a ring is a PID makes computing

[sage-support] Re: Canonical divisor help

2023-10-27 Thread Nils Bruin
On Friday, 27 October 2023 at 15:42:24 UTC-7 Nils Bruin wrote: It doesn't look like we quite have computation of Riemann-Roch spaces natively in sage yet Correction, that DOES seem to be implemented as well: sage: kC=C.function_field() sage: D=kC(kC.base_field().gen(0)).differential().divisor

[sage-support] Re: Canonical divisor help

2023-10-27 Thread Nils Bruin
A canonical divisor is the divisor of any differential on C so the following does the trick: sage: kC=C.function_field() sage: kC(kC.base_field().gen(0)).differential().divisor() It doesn't look like we quite have computation of Riemann-Roch spaces natively in sage yet, so finding effective

[sage-support] Re: help debugging latex() printing with trace()

2023-10-27 Thread Nils Bruin
On Thursday, 26 October 2023 at 16:03:27 UTC-7 Eric Majzoub wrote: I would like to debug the latex printing of an expression that ambiguous. To reproduce it: t = var('t') x = function('x')(t) latex( diff(x,t)^2 ) This produces ambiguous output, essentially: partial_t x^2 instead of

[sage-support] Re: Question about cysignals installation

2023-08-27 Thread Nils Bruin
I think it was written elsewhere that cysignals has not been ported to cython 3.0.0 yet. In fact, sage as a whole hasn't been upgraded to compile with cython 3.0.0 yet. On Wednesday, 16 August 2023 at 06:57:05 UTC-7 JC wrote: > Dear Sage developers, > > I'm trying to install the cysignals

Re: [sage-support] Importing sympy breaks CyclotomicField

2023-08-18 Thread Nils Bruin
Perhaps superfluously: the reason why redefining `Integer` (in your example through "from sympy import *") can break a command in sage that does not seem to involve `Integer`: sage: preparse("K = CyclotomicField(32)") 'K = CyclotomicField(Integer(32))' Due to Sage's preparser, any use of

[sage-support] Re: HPC Multi Node/Cluster Install Question

2023-08-10 Thread Nils Bruin
This response is very much in the "new direction or place to search" category. Sagemath's build process has been undergoing quite some changes. It used to be the case that sage-the-distribution kept virtually everything in-house, so that an install on shared folder would work great on a

[sage-support] Re: help with memory (sage)

2023-06-20 Thread Nils Bruin
On Monday, 19 June 2023 at 12:10:49 UTC+2 ayan.mah...@gmail.com wrote: Another crazy thing is that suppose I see 40% usage in memory and kill the program by cntrl-c but keep sage running. Then I start a new process in sage. The memory increases from 40%. As if there is some permanent stuff

Re: [sage-support] Re: sage-10.0 not working in Jupyter Lab

2023-06-01 Thread Nils Bruin
On Thursday, 1 June 2023 at 07:29:27 UTC-7 Luis Finotti wrote: I am not sure I will miss them (and other packages that depended on it -- fflas-ffpack libgivaro-dev libgivaro9 liblinbox-dev python3-brial python3-sage), but isn't there a way to force Jupyter to use Sage's one? I don't think

Re: [sage-support] Re: sage-10.0 not working in Jupyter Lab

2023-06-01 Thread Nils Bruin
On Wednesday, 31 May 2023 at 18:14:59 UTC-7 Luis Finotti wrote: Here is one with your suggested change: https://web.math.utk.edu/~finotti/misc/jl1.out Here is one with the original version: https://web.math.utk.edu/~finotti/misc/jl2.out the line: calling init:

Re: [sage-support] Re: sage-10.0 not working in Jupyter Lab

2023-05-30 Thread Nils Bruin
On Tuesday, 30 May 2023 at 06:09:23 UTC-7 Luis Finotti wrote: I looked at it, but I cannot tell if it is really the same issue, or how I could check. well ... it looks like the symbol that is found undefined is indeed of the type mentioned there. So that would suggest that indeed a system

[sage-support] Re: sage-10.0 not working in Jupyter Lab

2023-05-29 Thread Nils Bruin
On Monday, 29 May 2023 at 10:51:27 UTC-7 Luis Finotti wrote: Any ideas on how to fix it? Is it just me, or a bug with version 10.0? I followed the same steps I've always followed:

[sage-support] Re: sage-10.0 not working in Jupyter Lab

2023-05-29 Thread Nils Bruin
On Monday, 29 May 2023 at 07:39:33 UTC-7 Luis Finotti wrote: ImportError: /home/finotti/src/sage-10.0/src/sage/matrix/ matrix_modn_dense_float.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char _traitsIcESaIcEEEB5cxx11Ev Any ideas on

[sage-support] Re: test for floats and co.

2023-05-03 Thread Nils Bruin
On Wednesday, 3 May 2023 at 08:58:35 UTC-7 Nils Bruin wrote: However, be careful: sage: A=matrix(RR,2,2,[1,2,3,4]) sage: parent(A).is_exact() True because matrix rings presently aren't aware of inexactness of their base rings. This is something that is considered a bug; see https

[sage-support] Re: test for floats and co.

2023-05-03 Thread Nils Bruin
On Wednesday, 3 May 2023 at 08:21:39 UTC-7 G. M.-S. wrote: Related to a recent discussion, is there a (simple) way to find whether an expression contains non exact explicit numbers? For symbolic expression you should probably walk the entire expression tree. For sage objects, examining the

[sage-support] Re: '' in CC fails

2023-05-03 Thread Nils Bruin
On Wednesday, 3 May 2023 at 08:11:25 UTC-7 G. M.-S. wrote: This gives an error: sage: '' *in* CC […] ^ SyntaxError: invalid syntax It looks like this error comes from the fact that "eval('')" raises this. Apparently an empty string is not valid python for the parser. It is a

[sage-support] Re: A very short introduction to Sage

2023-04-17 Thread Nils Bruin
Nice work! For saving images of 3d-pictures: In the jupyter notebook with the "threejs" viewer you can click on the "i" in the lower right corner. That gets you a menu from which you can "sage as png". It will save a snapshot of what you're viewing. You can also get camera and viewpoint from

Re: [sage-support] Current advice for generic SageMath install advice

2023-03-29 Thread Nils Bruin
On Wednesday, 29 March 2023 at 13:46:04 UTC-7 Matthias Koeppe wrote: On Wednesday, March 29, 2023 at 1:33:07 PM UTC-7 Nils Bruin wrote: $ sage --help ... Sage-the-distribution options: --optional -- list all optional packages that can be installed --experimental -- list all

Re: [sage-support] Current advice for generic SageMath install advice

2023-03-29 Thread Nils Bruin
On Wednesday, 29 March 2023 at 13:06:25 UTC-7 Matthias Koeppe wrote: On Tuesday, March 28, 2023 at 10:18:23 PM UTC-7 Nils Bruin wrote: [...] leads me to believe that it's probably nor possible to install pynormaliz via "make" in a binary distribution. If you install Sage fro

Re: [sage-support] Current advice for generic SageMath install advice

2023-03-28 Thread Nils Bruin
On Tuesday, 28 March 2023 at 21:06:26 UTC-7 Matthias Koeppe wrote: On Monday, March 27, 2023 at 6:34:50 PM UTC-7 Nils Bruin wrote: In my experience, sagelib needs rebuilding to interface with normaliz (I think it's "make normaliz pynormaliz" nowadays, or perhaps one needs a pi

Re: [sage-support] Current advice for generic SageMath install advice

2023-03-27 Thread Nils Bruin
On Monday, 27 March 2023 at 17:47:54 UTC-7 Isuru Fernando wrote: We used to have separate architecture specific builds, but `sage` is now a meta-package that is architecture neutral (i.e. noarch). So, you get sage-9.8 for all architectures. We support sage-9.8 for the following OS and

[sage-support] Current advice for generic SageMath install advice

2023-03-27 Thread Nils Bruin
What would the current (Spring 2023) easiest instructions be for people to install sage? I'm asking in support of an install-fest for students, so the objective is to have easy solutions for giving students access on whatever platform they have available. I know about cloud-based solutions, so

Re: [sage-support] sagemathlib only building single-threaded

2023-02-11 Thread Nils Bruin
On Saturday, 11 February 2023 at 01:51:47 UTC-8 Dima Pasechnik wrote: > >make -j8 normaliz pynormaliz > > "sage -i" is obsolete - at least in my mind :-) OK -- thanks! so what used to be "spkg"s are now makefile targets. That reduces the possibility of having "third party" spkgs -- I guess

Re: [sage-support] sagemathlib only building single-threaded

2023-02-10 Thread Nils Bruin
On Tuesday, 7 February 2023 at 09:56:06 UTC-8 Dima Pasechnik wrote: > I don't think setting MAKE is a good idea. > > Did you try simply > > make -j8 build This actually causes a bit of a problem when you want to install additional packages, like `sage -i normaliz pynormaliz`: I wouldn't

Re: [sage-support] sagemathlib only building single-threaded

2023-02-07 Thread Nils Bruin
On Tuesday, 7 February 2023 at 09:56:06 UTC-8 dim...@gmail.com wrote: I don't think setting MAKE is a good idea. Did you try simply make -j8 build Thanks! I've tried "touch src/sage/structure/*" -- that triggers quite a large part of sagemathlib to be rebuilt. It used only 4 processes

[sage-support] sagemathlib only building single-threaded

2023-02-07 Thread Nils Bruin
For the trac-to-github transition I decided to move over my git upstream and origin. That all seems to have worked fine and I pulled the latest develop and ran "make configure" (was already happy) and then "make". This worked fine for the most part and with export MAKE="make -j8" it went quite

[sage-support] Re: Somethog in rotten is the state of Maxima...

2022-10-09 Thread Nils Bruin
On Sunday, 9 October 2022 at 08:45:36 UTC-7 Emmanuel Charpentier wrote: > ... and all is not fresh in Sympy's realm either. > > Full details in [this ask.sagematjh.org question]( >

[sage-support] Re: Citing Sage properly in a paper

2022-09-04 Thread Nils Bruin
On Sunday, 4 September 2022 at 10:31:42 UTC-7 george...@gmail.com wrote: > All, > I am about to submit a math paper to a journal. I would like to include a > proper citation for Sage. The Sage web page says: > > "Also, be sure to find out which components of SageMath, e.g. NumPy, PARI, > GAP,

[sage-support] Re: Create the Lorentz group in Sagemath.

2022-06-01 Thread Nils Bruin
On Wednesday, 1 June 2022 at 05:41:33 UTC+2 hongy...@gmail.com wrote: > On Wednesday, June 1, 2022 at 1:55:45 AM UTC+8 Nils Bruin wrote: > >> The "GO" mentioned here should correspond to the O(3;1) (or perhaps >> O(1;3) ) mentioned in the wikipedia article. >> &

[sage-support] Re: Create the Lorentz group in Sagemath.

2022-05-31 Thread Nils Bruin
help an expert in giving you further tips. On Tuesday, 31 May 2022 at 08:43:54 UTC+2 hongy...@gmail.com wrote: > On Sunday, May 29, 2022 at 6:27:18 PM UTC+8 Nils Bruin wrote: > >> It depends a little on what coefficients you want. If you're happy with >> rational numb

[sage-support] Re: Create the Lorentz group in Sagemath.

2022-05-29 Thread Nils Bruin
It depends a little on what coefficients you want. If you're happy with rational numbers then this should do the trick: G = diagonal_matrix(QQ,4,[-1,1,1,1]) lorentz_group = GO(4,QQ,invariant_form=G) which just constructs the group of (in this case QQ-valued) matrices that preserve the

[sage-support] Re: Need help with symbolic polynomials,

2022-05-05 Thread Nils Bruin
On Thursday, 5 May 2022 at 02:03:30 UTC-7 Ha wrote: > For Example: I tried this: > > f(X[1] = 1, X[2] = 5) > > and got this error: > > File "", line 10 f(X[Integer(1)] = > Integer(1), X[Integer(2)] = Integer(5)) > ^ SyntaxError: keyword can't be an expression > > Indeed, that does not work.

[sage-support] Re: Need help with symbolic polynomials,

2022-04-29 Thread Nils Bruin
Can you explain a little more about what does not work? When I try to replicate your example, everything works as expected: sage: n=2 : F = GF(7) : Rx=PolynomialRing(F,n,'x') : X=Rx.gens() sage: f=X[0]+X[1] sage: f(x0=1) x1 + 1 sage: f(x0=1,x1=1) 2 Alternatively you can evaluate

Re: [sage-support] Re: 2 questions on var

2022-04-16 Thread Nils Bruin
On Saturday, 16 April 2022 at 05:37:16 UTC-7 list...@gmail.com wrote: > > Thanks Samuel and Emmanuel. > > Follow up question: Why does > var('lambda',n=1) > fail? > Because the code in question tests the string actually passed in for whether it's a valid python identifier. Probably this is

[sage-support] Re: 2 questions on var

2022-03-06 Thread Nils Bruin
On Sunday, 6 March 2022 at 09:13:42 UTC-8 list...@gmail.com wrote: > > Beginner's questions, I guess. > > Some time ago, Emmanuel Charpentier wrote > > var("v", n=2) > > which gives > > (v0, v1) > > Where is this documented? I have been unable to find keywords for var > other than domain and

[sage-support] Re: type problem, I think

2022-02-11 Thread Nils Bruin
On Friday, 11 February 2022 at 07:51:17 UTC-8 mille...@gmail.com wrote: > I'm trying to do some least squares linear algebra. I built a matrix from > lists that I converted into column vectors and used the 'augment' function. Small detail, but slightly more efficient (it may not matter for

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-02 Thread Nils Bruin
On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier wrote: > As advertised, an atempt at a minimal (non-)working example : > > # Reproducible minimal example > with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element()) > # Working ring > WR =

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-30 Thread Nils Bruin
On Saturday, 29 January 2022 at 13:51:14 UTC-8 Emmanuel Charpentier wrote: > /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py > > in pari_field(self) > >>3134 if self._pari_field is None: >>3135 pari_pol =

[sage-support] Re: Snowman

2022-01-14 Thread Nils Bruin
In a blizzard? P=sage.plot.graphics.Graphics() P.show(axes=False) In general, though, this is not a very mathematical question, nor one for which a computer algebra package is going to be the best tool. Perhaps if you give some more context, someone will be able to give you more useful help.

[sage-support] Re: substitution in list

2021-12-28 Thread Nils Bruin
That's a python question. See for instance, https://stackoverflow.com/questions/2582138/finding-and-replacing-elements-in-a-list If you scroll down, there are some suggestions there that deal with multiple replacements as well On Tuesday, 28 December 2021 at 06:09:35 UTC-8 cyrille piatecki

[sage-support] Re: regulator

2021-12-27 Thread Nils Bruin
The "regulator" access routine should indeed at least allow to produce the regulator with the precision that pari used. If you look at the source of "regulator" you can see how to get the regulator to better precision. If K is your number field, then: K.pari_bnf().bnf_get_reg().sage() gets

Re: [sage-support] How do I run sage in python3?

2021-10-23 Thread Nils Bruin
I think Ubuntu 18.04 might only have an old, python2-based, version of sagemath packaged: https://packages.ubuntu.com/bionic/sagemath https://www.sagemath.org/download.html does host binary builds for 18.04, so downloading from there could get you version 9.4, which does run on python3. Or

[sage-support] Re: differentiation in InfinitePolynomialRing

2021-09-08 Thread Nils Bruin
On Wednesday, 8 September 2021 at 09:24:15 UTC-7 max...@gmail.com wrote: > Hi Simon, > > Thank you for your insight, and let me state that I > find InfinitePolynomialRing useful in combinatorics to deal with > (truncated) multivariate generating functions with apriori unknown number > of

[sage-support] Re: differentiation in InfinitePolynomialRing

2021-09-08 Thread Nils Bruin
On Wednesday, 8 September 2021 at 07:30:21 UTC-7 Simon King wrote: > > As I said, differentiation is not supposed to work. But I (as original > author) don't fully understand *why* it sometimes works and how to fix > that (by "fix", I mean "make it not work and, in the best case, suggest > to

[sage-support] Re: Memory issues when running simple program

2021-09-02 Thread Nils Bruin
I'd suspect the problem is not the ray tracing but the description of the object. Probably, `parametric_plot` produces a description of your shape with tubular segments and with a min_depth=20 it probably produces *very* many of them. So you probably don't get to ray tracing: you're stuck in

[sage-support] Re: Possible bugs in SR

2021-07-08 Thread Nils Bruin
On Thursday, 8 July 2021 at 09:49:18 UTC-7 Emmanuel Charpentier wrote: > Dear Nils, dear list, > > Le jeudi 8 juillet 2021 à 01:01:44 UTC+2, Nils Bruin a écrit : > >> I think the main problem in f(x) is a preparser problem: >> https://trac.sagemath.org/ticket/11621 &

[sage-support] Re: Possible bugs in SR

2021-07-07 Thread Nils Bruin
I think the main problem in f(x) is a preparser problem: https://trac.sagemath.org/ticket/11621 The other problems could just be numerical instability. The normal precision is 53 bits, which is good for about 16 decimal digits. The constants in the formula are more than that, so if there is

Re: [sage-support] Conveniently running and building sage on Win10

2021-06-01 Thread Nils Bruin
Thank you all! I needed a few steps here that were mentioned on aka.ms/wsl2-install : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart (restart) wsl

Re: [sage-support] Conveniently running and building sage on Win10

2021-06-01 Thread Nils Bruin
on and as a tablet OS, win10 seems to be performing just fine). I think the students who'd be using Win10 for development would have beefier machines. On Tuesday, 1 June 2021 at 01:36:31 UTC-7 dim...@gmail.com wrote: > On Tue, Jun 1, 2021 at 2:25 AM Nils Bruin wrote: > > > > Update:

Re: [sage-support] Conveniently running and building sage on Win10

2021-05-31 Thread Nils Bruin
Update: wsl --help isn't particularly eager to divulge version information, but some of it inadvertently has slipped through: in the description of the "--shutdown" option there is a mention of "the WSL 2 lightweight utility virtual machine", so unless wsl has a mysterious option that has a

Re: [sage-support] Conveniently running and building sage on Win10

2021-05-31 Thread Nils Bruin
On Monday, 31 May 2021 at 17:57:34 UTC-7 wst wrote: > I also think there are some subtleties with WSL versus WSL2 - which were > you actually using? They are dramatically different technologies… How do I tell which one I'm running as a user? I wasn't particularly planning on learning how to

[sage-support] Conveniently running and building sage on Win10

2021-05-31 Thread Nils Bruin
Asking for a friend ... or rather linux-challenged students: What's the most convenient and workable way of running sage on Win10 if you want to do a moderate amount of sage development as well (so, things like `sage -b` or `make build` should probably work, as should `git track push` etc.) ?

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 >

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

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

[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)

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

[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

[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

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

[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

[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

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 =

[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) >

[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

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

2020-08-04 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 >

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: 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

[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

[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: > >

[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

[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] 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

[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: 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-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

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

[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

[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

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

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

[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

[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

[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

[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: Loading a sage worksheet inside a notebook

2019-10-12 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

  1   2   3   4   5   6   >