sbromberger / LightGraphs.jl

An optimized graphs package for the Julia programming language
Other
670 stars 185 forks source link

Fix bug when making an `adjacency_matrix` from a `SimpleGraph` with self-loops in Julia 1.7 #1595

Open mtfishman opened 2 years ago

mtfishman commented 2 years ago

Fix bug when making an adjacency_matrix from a SimpleGraph with self-loops in Julia 1.7

As described in #1594, Julia 1.7 adds a stricter check on the SparseMatrixCSC constructor for consistency about the number of nonzero elements input. The number of nonzero elements are currently being overcounted in the case of SimpleGraph with self-loops, this should fix that overcounting.

Fixes #1594.

mtfishman commented 2 years ago

Note that when I run the tests locally using Julia 1.7, there are other tests that fail, so it looks like the package needs some other updates for Julia 1.7.

Tokazama commented 2 years ago

Would be great if these could be fixed soon. I'm trying to ensure improvements are stable across Julia versions for #1596 and these errors make it pretty difficult.