Python-graphblas

Latest version: v2024.2.0

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

Scan your dependencies

Page 4 of 21

2022.9.0

Deprecations
------------
- `gb.io.plot` moved to `gb.viz.plot`

Enhancements
------------
- Update to SuiteSparse:GraphBLAS 7.2.0
- Add docs website and improve some docstrings (269, 273, 274)
- https://python-graphblas.readthedocs.io/en/latest/
- Add ZSTD compression option to `x.ss.serialize` (277)
- Add `x.ss.reshape` methods to Vector and Matrix objects to change the shape while keeping all the values (277)
- Uses `GxB_Matrix_reshape` and `GxB_Matrix_reshapeDup`
- Add options to not return rows, columns, or values, in `x.to_values` (276)
- `rows, _, values = A.to_values(rows=True, columns=False, values=True)`
- `indices, _ = v.to_values(indices=True, values=False)`
- Excluding things can be faster when using SuiteSparse:GraphBLAS
- Add `clear=False` keyword to `dup`; this is like `empty_like` (275)
- Add `gb.viz.spy` and `gb.viz.datashade` to plot the sparsity pattern of a matrix (279)
- `gb.viz.spy` uses `matplotlib.spy` to create a static plot
- `gb.viz.datashade` uses `datashader` via `hvplot` to create interactive plots

2022.6.1

Deprecations
------------
- `gb.io.from_scipy_sparse_matrix` and `gb.io.to_scipy_sparse_matrix` (260)
- Use `gb.io.from_scipy_sparse` and `gb.io.to_scipy_sparse` instead.

Enhancements
------------
- Add `gb.ss.config` and `x.ss.config` to control SuiteSparse-specific configuration options of objects (258)
- Add `gb.io.to_scipy_sparse` and `gb.io.from_scipy_sparse` (260)
- Use `Recorder._repr_html_` for rich display (263)
- Improved UDT to/from string (256)
- Serialization with UDTs is still experimental and should not be relied upon!
- Automatic upload to PyPI 🤞

2022.6.0

- Add `.ss.serialize` and `.ss.deserialize` for Matrix and Vector objects (200)
- This exposes SuiteSparse:GraphBLAS (de)serialize and supports compression
- It also supports UDTs
- Allow boolean objects to be used as value masks (248)
- For example, `C(C < 5) << expr`
- Perform select with a mask or bool argument (251)
- For example, `A.select(B.S)` and `A.select(C < 5)`
- These are implemented as recipes
- `A.select(A < 5)` will be rewritten to the appropriate select operation (242)
- Assign many dense items at once, such as `v[[1, 2]] = [3, 4]` (250)
- Implemented as an efficient recipe

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

Renamed project to Python-graphblas and package to `graphblas` (204)
- `$ conda install python-graphblas`
- `$ pip install python-graphblas`
- `>>> import graphblas as gb`

Deprecations (205)
- Deprecate how we create empty objects:
- `Scalar.new(dtype)` -> `Scalar(dtype)`
- `Vector.new(dtype)` -> `Vector(dtype)`
- `Matrix.new(dtype)` -> `Matrix(dtype)`
- Also, dtype argument is now optional (default `FP64`)

Features
- Support select! (207)
- `gb.select.tril(A)`
- `A.select("diag", 1)`
- `gb.select.row(A < 3)`
- More to come; this is part 1 of [the plan](https://github.com/metagraph-dev/grblas/issues/147#issuecomment-1090498295)
- Support user-defined types! (177)
- `gb.dtypes.register_new(name, dtype)` (and `register_anonymous`)
- Any NumPy dtype that Numba can handle in no-python mode is valid
- For example, record dtypes and subarray dtypes
- Many operations such as `eq`, `first`, `positioni`, and `agg.count` that you expect to work, do.
- Auto-broadcast vectors with diag and outer product (203)
- `plus(A & v)` -> `any_plus(A v.diag())`
- and infix, such as `A + v` and `v - A` (using normal infix rules)
- Support ewise-union in infix (203)
- `plus(x | y, left_default=1, right_default=2)`
- Add `x.ss.iter{keys,values,items}` (201)
- This exposes fast SuiteSparse:GraphBLAS iteration
- The object should not be mutated during iteration

Bug fixes
- Fixed segfault from using complex scalars and complex monoids (164, 210)
- Misc

Page 4 of 21

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.