Re: [sage-devel] Graph([('A','B'),(1,2)]).edges() raises weird traceback

2023-07-05 Thread Vincent Delecroix
I do not like a solution involving a m log(m) cost at initialization. EdgesView is supposed to be O(1) at construction right? On Thu, 6 Jul 2023 at 06:54, David Coudert wrote: > > The current design choice in `EdgesView` is to sort only when asking for the > list of edges, that is when calling `

Re: [sage-devel] Graph([('A','B'),(1,2)]).edges() raises weird traceback

2023-07-05 Thread Georgi Guninski
I am not sure I understand correctly, but if you give warning, you already know with high probability that functionality will be broken and besides the warning you will get exception. Is this correct? -- You received this message because you are subscribed to the Google Groups "sage-devel" grou

Re: [sage-devel] Graph([('A','B'),(1,2)]).edges() raises weird traceback

2023-07-05 Thread David Coudert
The current design choice in `EdgesView` is to sort only when asking for the list of edges, that is when calling `__repr__` if `sort=True`. The alternative is to sort at the initialization of the object and to cache the sorted list of edges in the object. Should we go for this alternative implem

Re: [sage-devel] Re: Exception in `G=Graph([("A",1)]);G.faces()`

2023-07-05 Thread Georgi Guninski
On Wed, Jul 5, 2023 at 8:02 PM Vincent Delecroix <20100.delecr...@gmail.com> wrote: > > On Wed, 5 Jul 2023 at 17:51, Georgi Guninski wrote: > > > > I just reported a bug on github, though I don't like microsoft services at > > all. > > Is google any better? > That is an open problem for me. I don

Re: [sage-devel] Re: Exception in `G=Graph([("A",1)]);G.faces()`

2023-07-05 Thread Vincent Delecroix
On Wed, 5 Jul 2023 at 17:51, Georgi Guninski wrote: > > On Wed, Jul 5, 2023 at 4:05 PM David Coudert wrote: > > > > I have opened https://github.com/sagemath/sage/issues/35902 to collect such > > kind of issues. > > Please use it to share new cases. > > > I just reported a bug on github, though

[sage-devel] Re: Memory leak (quite bad)

2023-07-05 Thread Nils Bruin
The leak does not seem to be on the python heap, so Pynac is the next likely candidate (I don't think this code should be hitting maxima_lib) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails

Re: [sage-devel] Re: Exception in `G=Graph([("A",1)]);G.faces()`

2023-07-05 Thread Georgi Guninski
On Wed, Jul 5, 2023 at 4:05 PM David Coudert wrote: > > I have opened https://github.com/sagemath/sage/issues/35902 to collect such > kind of issues. > Please use it to share new cases. > I just reported a bug on github, though I don't like microsoft services at all. -- You received this messag

Re: [sage-devel] Memory leak (quite bad)

2023-07-05 Thread Edgar Costa
Hi Gonzalo, I highly recommend using https://github.com/rfjakob/earlyoom instead of waiting for OOM to kick in. Cheers, Edgar On Wed, Jul 5, 2023 at 11:24 AM Gonzalo Tornaria wrote: > This slowly and inexorably goes on. Computing `sqrt(T2)` leaks 32 bytes > each and every time (asymptotically)

[sage-devel] Memory leak (quite bad)

2023-07-05 Thread Gonzalo Tornaria
This slowly and inexorably goes on. Computing `sqrt(T2)` leaks 32 bytes each and every time (asymptotically). Found by a student who, through no fault of himself, brought down our server (unable to ssh in until the OOM triggered -- but since the leak is slow it takes a while to trash 16G of swa

[sage-devel] Re: Exception in `G=Graph([("A",1)]);G.faces()`

2023-07-05 Thread David Coudert
I have opened https://github.com/sagemath/sage/issues/35902 to collect such kind of issues. Please use it to share new cases. On Wednesday, July 5, 2023 at 9:38:28 AM UTC+2 Georgi Guninski wrote: > Hi sage devs, your daily dose of incomparable objects, > fix 'em while they are free ;) > > G=Grap

[sage-devel] Re: grep-ing for sort() in graphs

2023-07-05 Thread David Coudert
Most of these calls are done on purpose and safe, but some may raise an error. > ./base/static_sparse_backend.pyx:512: vertices.sort() It's inside a try ... except... statement. We may certainly remove it in the future. > ./base/static_sparse_graph.pxd:10: void qsort(void *base, int nmemb, i

[sage-devel] Exception in `G=Graph([("A",1)]);G.faces()`

2023-07-05 Thread Georgi Guninski
Hi sage devs, your daily dose of incomparable objects, fix 'em while they are free ;) G=Graph([("A",1)]);G.faces() TypeError Traceback (most recent call last) Cell In [1], line 1 > 1 G=Graph([("A",Integer(1))]);G.faces() File /home/sc_serv/sage/src/sage/graphs

Re: [sage-devel] Re: New package creation - advice/help requested

2023-07-05 Thread Aram Dermenjian
In essence, yes we're expecting to change much of the code as the structure will be changing in addition to fixes to some major bugs in the code. Moreover, I'm working on this with two (undergraduate) interns that I have and so they're newer to programming so I wanted them to work in a more "sandbo