Grblas

Latest version: v2022.4.0.1

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

Scan your dependencies

Page 1 of 6

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

2022.4.0

Deprecation cycle! ([190](https://github.com/metagraph-dev/grblas/pull/190))
- **Removed:**
- `matrix.reduce_rows` (use `matrix.reduce_rowwise` instead)
- `matrix.reduce_columns` (use `matrix.reduce_columnwise` instead)
- `matrix.ss.scan_rows` (use `matrix.ss.scan_rowwise` instead)
- `matrix.ss.scan_columns` (use `matrix.ss.scan_columnwise` instead)
- `grblas.backends` removed
- **Deprecate:**
- `vector.ss.diag(A)` (renamed to `vector.ss.build_diag(A)`; use `A.diag` instead)
- `matrix.ss.diag(v)` (renamed to `matrix.ss.build_diag(v)`; use `v.diag` instead)

Other changes
- Autocompute scalar expressions in `x.update(expr)` if valid ([192](https://github.com/metagraph-dev/grblas/pull/192))
- Improve tab-completion of operator namespaces ([191](https://github.com/metagraph-dev/grblas/pull/191))
- Add missing semirings that were the commutation of existing semirings ([191](https://github.com/metagraph-dev/grblas/pull/191))
- This added semirings with `rpow`, `rtruediv`, `rfloordiv`, and `abssecond` binary operators.
- Update `v += expr` to do `v(plus) << expr` instead of `v << plus(v | expr)` when `expr` is not scalar-like ([193](https://github.com/metagraph-dev/grblas/pull/193))
- Add `x.ss.iso_value` to Vector and Matrix objects ([194](https://github.com/metagraph-dev/grblas/pull/194))
- Improved `gb.io.from_networkx` ([195](https://github.com/metagraph-dev/grblas/pull/195))
- Expose arguments to `networkx.to_scipy_sparse_array`
- Use `Matrix.ss.import_csr` for faster importing of data when using "suitesparse" backend
- Determine whether the matrix is iso-valued when using "suitesparse" backend

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.