Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread John H Palmieri
Just do a global search-and-replace: change ".vertices()" to ".vertices(sort=True, key=id)" or ".vertices(sort=True, key=str)". This is not a new change; the deprecation warning has been in place almost a year, and there was discussion leading up to it. See

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Georgi Guninski
Thanks. In my code, this backwards incompatibility breaks over 150 calls to Graph.vertices() and I suspect I am not the only one. I think the root of the problem is the change from python2 to python3. In python2 |["A",1].sort()| works fine, while it doesn't work in python3. My recommendation is

[sage-devel] Faster algorithm for order dimension

2023-06-26 Thread Maximilian Wittmann
Hey everyone, I am currently doing my masters thesis on the dimension of cartesian products of posets and believe I have stumbled upon an alternative approach to calculate the dimension, that performs better than the one in sage. (No published results) C = posets.Crown(2) C2 =

[sage-devel] Re: issue with division in fraction field of univ poly

2023-06-26 Thread Nils Bruin
With your data, we get: sage: K=parent(1/D2) sage: r=K(D1) sage: s=K(1/D2) sage: r.numerator().gcd(s.denominator()) 0 and I think that's the zero which leads to the division-by-zero error. Of course, a 0 returned as gcd is just a bug. It doesn't look like the coercion framework is really

[sage-devel] Re: Graph([('A',1)]).adjacency_matrix() raises exception

2023-06-26 Thread John H Palmieri
By the way, I see this error message: TypeError: Vertex labels are not comparable. You must specify an ordering using parameter ``vertices`` Indeed, this works: g.adjacency_matrix(vertices=['A', 1]) On Monday, June 26, 2023 at 11:32:56 AM UTC-7 John H Palmieri wrote: > Please read

[sage-devel] Re: Graph([('A',1)]).adjacency_matrix() raises exception

2023-06-26 Thread John H Palmieri
Please read the help message for adjaceny_matrix. g = Graph([('A',1)]) g.adjacency_matrix? prints, among other things: * "vertices" -- list (default: "None"); the ordering of the vertices defining how they should appear in the matrix. By default, the ordering given by

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Nils Bruin
On Monday, 26 June 2023 at 16:30:20 UTC+2 Georgi Guninski wrote: > As of https://github.com/sagemath/sage/issues/22349, this argument must be explicitly specified (unless a "key" is given); otherwise a warning is printed and "sort=True" is used. The default will eventually be changed to

[sage-devel] Graph([('A',1)]).adjacency_matrix() raises exception

2023-06-26 Thread Georgi Guninski
In both 9.6 and https://sagecell.sagemath.org/ Graph([('A',1)]).adjacency_matrix() raises exception TypeError: '<' not supported between instances of 'int' and 'str' -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Georgi Guninski
On Mon, Jun 26, 2023 at 4:40 PM kcrisman wrote: > As of https://github.com/sagemath/sage/issues/22349, this argument must be > explicitly specified (unless a "key" is given); otherwise a warning is > printed and "sort=True" is used. The default will eventually be changed to > "False". > I

[sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread kcrisman
On Saturday, June 24, 2023 at 9:20:39 AM UTC-4 Georgi Guninski wrote: https://sagecell.sagemath.org/ Graph([(0,1)]).vertices() /tmp/ipykernel_1853928/1298164553.py:1: DeprecationWarning: parameter 'sort' will be set to False by default in the future See

[sage-devel] issue with division in fraction field of univ poly

2023-06-26 Thread Ben Hutz
In investigating an issue with dynatomic_polynomial in dynamical systems, I came across an odd issue with polynomials with fraction field coefficients. Here is the condensed version: K. = Frac(QQ['a']) P. = ProjectiveSpace(K, 1) D2=-x^5 + (-3*a^2 + 7*a - 2)/a*x^4*y + (6*a^2 - 12*a +

[sage-devel] Re: "TypeError: not a constant polynomial" when trying to fix `normalize_coordinates` in `projective_morphism.py`

2023-06-26 Thread Ben Hutz
The issue is with this line of the PR: denom = R.ideal(list(self)).absolute_norm().denominator() list(self) is a list of polynomials. You want the ideal of the coefficients of those polynomials. On Sunday, June 25, 2023 at 3:54:07 PM UTC-5 Jing Guo wrote: > Hello everyone, > > As it is

[sage-devel] Fwd: [fricas-devel] FriCAS status and jFriCAS

2023-06-26 Thread Dima Pasechnik
I've opened an issue to create a configure option for system-wide fricas to be usable with Sage. https://github.com/sagemath/sage/issues/35837 Please post there details on what you do to use Sage with system-wide fricas now - this might help. -- Forwarded message - From: 'Nasser