Python-graphblas

Latest version: v2025.2.0

Safety actively analyzes 723119 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 23

2022.5.0

Deprecations
- `require_monoid=` keyword in `ewise_add` has been deprecated (236)
- New behavior is like `require_monoid=False` and will no longer raise

Improvements
- Add `IndexUnaryOp` and `gb.indexunary` namespace (229)
- Apply works with both `IndexUnaryOp` and `SelectOp`
- Add UDF support for `IndexUnaryOp` and `SelectOp` (233)
- Add `x.get` method to Scalar, Vector, and Matrix objects, with optional default value (241)
- These return a Python scalar of the element at the location, or default value if element is missing
- Make aggregators callable (242)
- `agg.sum(A)` same as `A.reduce_scalar(agg.sum)`
- `agg.max(A, rowwise=True)` same as `A.reduce_rowwise(agg.max)`
- Add `mask.new()`, which can also merge two masks efficiently (240)
- The result is True wherever the mask(s) would have been applied, and empty otherwise
- `complement=True` returns the complement
- Allow `A << 1` to create dense (iso-valued) matrices (this used to raise) (243)
- Add "index" and "value" strings to Vector repr (226)
- Add `cbrt` from SuiteSparse:GraphBLAS 7.1.0 to compute principal cube root (244)
- For example, `cbrt(-8) == -2`, and the result is a float
- Also, add numpy ufuncs `cbrt`, `float_power`, and `positive` to the `numpy` namespaces (237)
- `op.from_string` now includes aggregators (last priority) (235)
- e.g., `op.from_string("count")` now works
- Allow record dtypes to be created via dicts, such as `{'x': int, 'y': float}` (227)
- Allow scalars with record dtypes to be created from dicts (228)
- e.g., `Scalar.from_value({'x': 1, 'y': True}, dtype=udt)`
- Added `scripts/` folder in repo to help developers/contributors perform useful tasks (231)

2022.4.2

- Improvements to operators and user-defined functions (UDFs):
- Allow Python functions to be passed as BinaryOp or UnaryOp, which will be automatically jitted
- Add `register_new` and `register_anonymous` functions to e.g. `gb.binary` and `gb.semiring` namespaces
- Add `binary.binom` to compute binomial coefficients exactly
- Improvements to dtypes and user-defined types (UDTs):
- Auto-register UDTs, which means non-builtin NumPy dtypes may be passed as the dtype
- Improved default names of UDTs
- Improved dtype inference for `first`, `second`, and `pair` binary operators
- For example, `first` uses the dtype of the first argument, and `pair` defaults to INT64
- Add `.reposition(...)` to Matrix and Value objects, which "shift" or reposition elements
- Broadcasting Vector to Matrix (such as `plus(A & v)`) has better repr and is more efficient with masks
- Add `sort=True` keyword to `.to_vector(...)` method on vectors and matrices
- Deprecate `mask.mask` and rename to `mask.parent`
- Added git pre-commit hooks to make it easier for contributors

2022.4.1

- Updated to use `python-graphblas` instead of `grblas`
- Added average_clustering, clustering, transitivity, and triangles for undirected, unweighted graphs
- Added git pre-commit hooks
- Added some helpful utility functions to make things easier/cleaner

2022.4.0

First release!

`graphblas-algorithms` is just getting started. It only has PageRank:
- `graphblas_algorithms.pagerank` matches NetworkX API and passes all NetworkX PageRank tests.
- `graphblas_algorithms.link_analysis.pagerank_core` is a fast, GraphBLAS-only implementation that is used by the former.
- This is the implementation to bring to benchmarking shootout.

**_This project is in alpha and may undergo significant changes._**

2022.3.1

- Add `gb.agg.from_string`
- Make `diag` a mainline feature (still available under `.ss` namespace)
- Fix some failing tests

2022.3.0

Lot's of changes this release!
- Switch versioning to use [Calendar versioning (calver)](https://calver.org/)
- Support (and test on) Python 3.10
- Update to SuiteSparse:GraphBLAS 6.2.X
- **Breaking change:** reductions to scalar on empty collections now result in empty scalars by default ([162](https://github.com/metagraph-dev/grblas/pull/162))
- This affects `my_vector.reduce` and `my_matrix.reduce_scalar`
- To get old behavior where the monoid identity is returned, do e.g. `v.reduce(allow_empty=False)`.
- Add support for `GrB_Scalar` objects ([163](https://github.com/metagraph-dev/grblas/pull/163))
- A `Scalar` object in `grblas` may be a C scalar or `GrB_Scalar` (the default).
- Use `is_cscalar=True` upon creating the Scalar to get a C scalar
- Scalars may now be passed to `gb.ss.concat` as length-1 vectors or shape (1, 1) matrices
- Scalars now have `c.is_cscalar` and `c.is_grbscalar` attributes
- Add `ewise_union` method ([159](https://github.com/metagraph-dev/grblas/pull/159))
- This is like `ewise_add` with a Binary Operator and user-provided defaults for the left and right values.
- Subtraction infix `x - y` on Matrices or Vectors now use `ewise_union` with default values of 0.
- Add `.ss.compactify` to Vector and Matrix objects ([144](https://github.com/metagraph-dev/grblas/pull/144))
- For example, this can shift all (or N) values contiguously to the left.
- Supported operations: `first`, `last`, `smallest`, `largest`, `random`.
- Add `.is_positional` attribute to operators ([161](https://github.com/metagraph-dev/grblas/pull/161))
- For example, `unary.positioni`, `binary.firsti`, and `semiring.any_secondj` are "positional"
- Autocompute `A[idx]` as extract ([166](https://github.com/metagraph-dev/grblas/pull/166))
- Also, add better reprs for indexed expressions
- Support deleting many items using slice or indexing notation ([163](https://github.com/metagraph-dev/grblas/pull/163))
- For example, `del A[[1, 2], :3]`
- Support negative indices ([143](https://github.com/metagraph-dev/grblas/pull/143))
- Allow resolved indices to be converted back to Python indices ([142](https://github.com/metagraph-dev/grblas/pull/142))
- Add `__sizeof__` method to Matrix, Vector, and Scalar objects to get memory usage ([$145](https://github.com/metagraph-dev/grblas/pull/145))
- Added a code of conduct ([167](https://github.com/metagraph-dev/grblas/pull/167))
- See: https://github.com/metagraph-dev/grblas/blob/main/CODE_OF_CONDUCT.md

Page 5 of 23

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.