GeezerVison is showing github.com — [doc] Add `plus_first` and `plus_second` semirings to docs · Issue #497 · python-graphblas/python-graphblas
[doc] Add plus_first and plus_second semirings to docs #497
Description
The plus_first and plus_second semirings are very useful for writing algorithms that only care about the nonzero structure of the matrix because they can work on any user matrix without copy or modification.
The documented list of semirings, https://python-graphblas.readthedocs.io/en/stable/user_guide/operators.html#semirings , does not include these, nor could I find them in the code anywhere.
I only found them when I saw pygraphblas had them and just tried the name. They're very useful! I think they belong in the docs.
Reacted by Sultan Orazbayev
Activity
eriknw commented on Sep 5, 2023
Agreed 💯, they're very useful and should be in the online docs.
Related issue #410, which also include a partial implementation.
To explore the API of python-graphblas, using tab-completion in IPython or Jupyter is very nice, but I know everybody doesn't use this workflow, and our docs should be complete regardless.
Btw, we aim to expose 100% of features from SuiteSparse:GraphBLAS. I regard missing functionality as a bug.
alugowski commented on Sep 7, 2023
ContributorAuthor
More actions
Good point, Jupyter tab completion does pick up a lot of this.
My workflow is generally PyCharm's tab completion, which is generally very good but based on static analysis instead of Jupyter's runtime introspection.
python-graphblas generally does not play well with static analysis at all, mostly due to the way the types are moved around at import time. Even gb.Matrix is not found. In my own projects a combination of defining things in __all__ and using type hints goes a long way, but i understand that most python-graphblas members are just a forward of whatever is exposed from C.
Metadata
Metadata
Development
No branches or pull requestsIssue actions