graphblas-algorithms icon indicating copy to clipboard operation
graphblas-algorithms copied to clipboard

Graph algorithms written in GraphBLAS

Results 20 graphblas-algorithms issues
Sort by recently updated
recently updated
newest added

Degree Centrality Calculation Differs From Networkx

[{"_id":"67e53563e8959727000c5165","body":"Thanks for the report and sharing the issue on StackOverflow @davidsilveiro!\r\n\r\nIn the example above `G` is directed (as is required for `in_degree_centrality`), and `GG` is undirected. So, to fix the example, change `GG = ga.Graph.from_networkx(G)` to `GG = ga.DiGraph.from_networkx(G)`:\r\n```diff\r\n- GG = ga.Graph.from_networkx(G)\r\n+ GG = ga.DiGraph.from_networkx(G)\r\n```\r\nI would also suggest considering using the networkx API for dispatching:\r\n```python\r\nnx.in_degree_centrality(GG)\r\n```\r\nor\r\n```python\r\nnx.in_degree_centrality(G, backend=\"graphblas\")\r\n```\r\nThe latter converts the input graph G to a graphblas graph. This conversion can be cached in NetworkX 3.3 via first setting a configuration:\r\n```python\r\nnx.config.cache_converted_graphs = True\r\n```\r\nFinally, `ga.in_degree_centrality` should probably raise if the input is an undirected graph, so this is a valid bug report. Using `ga.nxapi.in_degree_centrality(GG)` raises as expected if `GG` is undirected. I think having functions appear in both `ga` and `ga.nxapi` namespaces may be a little unclear, and it would be better if instead we moved the networkx backend API to e.g. `nx_graphblas`.","issue_id":1716117157717,"origin_id":2118815797,"user_origin_id":2058401,"create_time":1716036464,"update_time":1716036464,"id":1743074659114,"updated_at":"2025-03-27T11:24:19.113000Z","created_at":"2025-03-27T11:24:19.113000Z"}] comment

A few days ago a user posted an issue describing calculation's from NetworkX not matching against Graphblas's implementation on SO. Thought i'd pass on the details along as another kind...

add `id_to_key` as argument to graph constructor

[{"_id":"67e535c266394a305a013b6f","body":"Sounds good to me :+1:\r\n\r\nAlso, looking at this now, `id_to_key` could just be a list or Sequence or whatever since the keys will always be 0 to N-1. This requires a sort, but will be more memory efficient. What do you think?\r\n\r\nWe also need to update so tests pass with NetworkX 3.3, so don't expect CI to pass right now. My bad for being slow--I'm in the middle of big life changes. The change I know we need to make is to allow conversion from `ga.Graph` to `nx.Graph` to be able to be structure-only. This means graphblas-algorithms graphs need to know the edge property, and allow the edge property to be None and all values present in the adjacency matrix should be 1.","issue_id":1716117157723,"origin_id":2064078685,"user_origin_id":2058401,"create_time":1713451660,"update_time":1713451660,"id":1743074754278,"updated_at":"2025-03-27T11:25:54.277000Z","created_at":"2025-03-27T11:25:54.277000Z"}] comment

in `ga.Graph.__init__` we can specify `key_to_id`. I can't see any reason why this _must_ be a `stdlib.dict` and not any other class that implements the `typing.Mapping` protocol (`__getitem__`, `__len__`, `__iter__`)....

updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/abravalheri/validate-pyproject: v0.15 → v0.24.1](https://github.com/abravalheri/validate-pyproject/compare/v0.15...v0.24.1) - [github.com/PyCQA/autoflake: v2.2.1 → v2.3.1](https://github.com/PyCQA/autoflake/compare/v2.2.1...v2.3.1) - [github.com/pycqa/isort: 5.13.2 → 6.0.1](https://github.com/pycqa/isort/compare/5.13.2...6.0.1) - [github.com/asottile/pyupgrade: v3.15.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.19.1) - [github.com/MarcoGorelli/auto-walrus: v0.2.2 →...

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.11 to 1.8.14. Release notes Sourced from pypa/gh-action-pypi-publish's releases. v1.8.14 🛠️ Internal Dependencies Nothing changed feature-wise. The only notable update is that the underlying container runtime now...

dependencies

The main thing we still need to add it the ability to support a structure-only graph. For example, when we convert from a graphblas Graph to a networkx Graph, we...

enhancement
hygiene

Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1. Release notes Sourced from pre-commit/action's releases. pre-commit/[email protected] Misc Update actions/cache to v4 #190 PR by @​SukiCZ. #189 issue by @​bakerkj. Commits 2c7b380 v3.0.1 8e2deeb...

dependencies

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. Release notes Sourced from codecov/codecov-action's releases. v4.0.0 v4 of the Codecov Action uses the CLI as the underlying upload. The CLI has helped to...

dependencies

We compute and cache many properties such as `has_self_edges`, `degrees-` (w/o diagonals), `degrees+` (with diagonals), etc., which is actually very handy. However, the code is a little complicated (_cough cough_,...

From #82, showing `` is not the most helpful even though a `NodeMap` is a `MutableMapping`. So, the repr of `NodeMap` should be updated to look more dict-like. Same for...

Logo for `graphblas-algorithms`

[{"_id":"67e535cdee2780d3920cc222","body":"Looks cool, but the styles for g and a are rather distinct IMO. (not to say I have better ideas)","issue_id":1716117157767,"origin_id":1752150679,"user_origin_id":20208402,"create_time":1696795733,"update_time":1696795733,"id":1743074765127,"updated_at":"2025-03-27T11:26:05.127000Z","created_at":"2025-03-27T11:26:05.127000Z"},{"_id":"67e535cdee2780d3920cc223","body":"I agree, styles are very weird, and the `@` doesn't scream \"matrix multiply\" w\/o something to the right of it. Here's a G and A that are a bit more similar:\r\n![ga2](https:\/\/github.com\/python-graphblas\/graphblas-algorithms\/assets\/2058401\/fa831b82-abdb-4eb2-bc87-9f648211bf09)\r\n\r\nI'm all ears for ideas.\r\n\r\nbtw, the angle of the \"G\" is 12.458910191690801 degrees.","issue_id":1716117157767,"origin_id":1752163914,"user_origin_id":2058401,"create_time":1696799805,"update_time":1696800257,"id":1743074765140,"updated_at":"2025-03-27T11:26:05.139000Z","created_at":"2025-03-27T11:26:05.139000Z"},{"_id":"67e535cdee2780d3920cc224","body":"Another:\r\n![ga3](https:\/\/github.com\/python-graphblas\/graphblas-algorithms\/assets\/2058401\/02775391-ab6c-4be2-a99d-ba7ab47825f0)\r\nand the python-graphblas logo shown for reference:\r\n![python-graphblas-logo](https:\/\/github.com\/python-graphblas\/graphblas-algorithms\/assets\/2058401\/6e6aec00-64e1-4d6d-8af2-f007cc8eaa98)\r\n","issue_id":1716117157767,"origin_id":1753229555,"user_origin_id":2058401,"create_time":1696865382,"update_time":1696865382,"id":1743074765153,"updated_at":"2025-03-27T11:26:05.153000Z","created_at":"2025-03-27T11:26:05.153000Z"}] comment

Now that we have a logo for `python-graphblas` (https://github.com/python-graphblas/python-graphblas/pull/506), I suppose the logical next step is to make a logo for `graphblas-algorithms`. It would probably make sense to use a...