Grblas

Latest version: v2022.4.0.1

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

Scan your dependencies

Page 4 of 6

1.3.8

- Update to SuiteSparse:GraphBLAS 5.1.2.
- Add `x.ss.pack` and `x.ss.unpack_*` methods to Vector and Matrix objects that mirror import/export.
- Add `x.ss.nbytes` to get the number of bytes used by Vector and Matrix objects.

1.3.7

- Update to SuiteSparse:GraphBLAS 5.0.3
- Add new SuiteSparse GxB functions:
- `Matrix.ss.diag`, `Vector.ss.diag`, and `grblas.ss.diag`
- `Matrix.ss.split`
- `Matrix.ss.concat` and `grblas.ss.concat`
- Add sane coercions to operators such as using `exp` on integer dtypes.
- Allow Scalars to be used in indexing
- Allow Scalars to be used when constructing numpy arrays
- Fix dtypes.unity for complex numbers (all pairs now match numpy behavior)
- Remove `"pygraphblas"` backend, as both libraries will use `python-suitesparse-graphblas` and be compatible

1.3.6

- Update `grblas` to be a pure Python package by depending on `suitesparse-graphblas`!
- Rename `div` to `cdiv` in semirings and add `truediv` and `floordiv` in semirings.
- Fix monoid attribute of semirings with `land`, `lor`, and `lxor` to coerce properly.
- Don't allow expressions like `v[w]`, which previously iterated over the values of Vector `w`.
- Don't allow vectors or matrices to be directly cast to numpy arrays such as `np.array(v)`.
- Direct the users to e.g. `v.to_values()` instead.
- Support `dup_op=` keyword argument when converting from scipy.sparse and MatrixMarket formats.
- Improve recording by using `name=""` for scalars created during operations.
- Fix the recorder in Jupyter notebooks (again)

1.3.5

- Add `"__weakref__"` to `__slots__` so objects are weakref-able.
- Test with Python 3.9

1.3.4

- Add infix sugar for `ewise_plus`, `ewise_mult`, `mxm`, `apply`, etc! For example:
- `C << op(A | B) ewise_plus`
- `C << op(A & B) ewise_mult`
- `C << op(A B) mxm, vxm, mxv`
- `C << op(A) apply unary`
- `C << op(A, 1) apply binary, right=1`
- `C << op(1, A) apply binary, left=1`
- Operators:
- Add `grblas.op` namespace that has all unary, binary, and semiring objects.
- Automatically convert binaryop to monoid or vice versa where appropriate if possible.
- Hence, one can use a binaryop from `grblas.op` namespace as a monoid.
- Add attributes such as `binop.monoid`, `monoid.identity`, and `semiring.binaryop` to operators.
- Don't allow a semiring where a monoid or binaryop is expected (do e.g. `semiring.monoid` instead).
- Renamed `grblas.ops` to `grblas.operator`, which defines the base classes of operators.
- Add `my_matrix.ss.head(n)` and `my_vector.ss.head(n)` that returns the indices and values of n elements.
- Improve repr of very sparse Vector and Matrix objects by using the new `C.ss.head()` methods.
- Add `grblas.replace` singleton, so one can do e.g. `C(mask, replace) << A.mxm(V)`.
- Add ability to read and write Matrix Market files with `grblas.io.mmread` and `grblas.io.mmwrite`.
- Allow Scalar, Vector, and Matrix objects to be serialized with pickle.
- Added `__slots__` to all the things.

1.3.3

- Update to SuiteSparse 4.0.3 (new unary and binary ops, etc.)
- Added Windows support (without complex dtypes)
- Use NumPy's malloc/free, so Python knows memory usage of GraphBLAS objects
- Many improvements to import and export with SuiteSparse
- Renamed `fast_export` to `export` and `fast_import` to `import_any`
- Added other import methods such as `Matrix.ss.import_csr`
- support zero-copy import and export if possible (user must opt in)
- formats: csr, csc, hypercsr, hypercsc, bitmapr, bitmapc, fullr, fullc
- Matrix and Vector
- allow contains expressions
- `1 in v`, True if there is a value at `v[1]`
- `(1, 2) in A`, True if there is a value at `A[1, 2]`
- iteration
- Yields the indices of the structure
- Add `.wait()` method
- Add format attribute as e.g. `my_matrix.ss.format`
- One of "csr", "hypercsc", "bitmapr", etc
- Scalar
- Add `.shape` attribute (like Vector and Matrix, and like numpy scalars)
- Able to cast to float and int
- Allow things like `__eq__` where `.value` is or computes a scalar
- Don't allow `__eq__` or `__bool__` where they don't make sense

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.