Grblas

Latest version: v2022.4.0.1

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

Scan your dependencies

Page 3 of 6

1.3.14

- Support infix between non-scalar (i.e., Matrix and Vector) objects! Here are the rules:
- monoids with identity 0 use `ewise_add`: `+`,`^`, and `|`.
- `A - B` will use `GxB_eWiseUnion` with `0` as the defaults (**not yet supported!**)
- others use `ewise_mult`
- Use numpy rules for unifying types, including when scalars are used.
- For example, `A + c` with `A.dtype == 'INT8'` and `c.dtype == 'INT64'` will result in `INT8` dtype by default.
- See: https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html
- Allow `ss.concat` to use expressions, such as `ss.concat([[A, A.T, A + 1]])`
- **Fix:** removed `op.div`, added `op.truediv`, and made sure `op` namespace matches other operator namespaces

1.3.13

Deprecations:
- Changed e.g. `reduce_rows` to `reduce_rowwise` and deprecate the former
Updates:
- Added `x.ss.selectk(how, k)` methods for vectors and matrices
- `how` can be `"random"`, `"first"`, `"last"`. Vector also supports `"largest"` and `"smallest"`
- Allow operators to be given as strings, such as `A.mxm(B, 'min.+[float]')`
- Also added from_string functions such as `gb.binary.from_string('+')`
- `x | y`, `x & y`, `x ^ y`, and `~x` infix is only value-y for bool dtypes
- `x | y` and `x ^ y` uses ewise_add, `x & y` uses ewise_mult
- Add `op.commutes_to` and `op.is_commutative` to binaryops, monoids, and semirings
- Support slices from SuiteSparse (can now perform huge slices on huge objects!)
- Recorder now logs exceptional C calls and their errors
- Improved `get_semiring(monoid, binaryop)` to better handle ops from numpy namespaces.
- Make `dtype=` an optional positional argument (like NumPy does), not keyword-only
- Map numpy ops in e.g. gb.binary.numpy to GraphBLAS ops (by default)
Fixes:
- Fixed `truediv` on complex dtypes
- Fixed displaying of `nan` in reprs
- Fixed repr of large iso-valued objects
- Fixed types of `land`, `lor`, and `lxor` binary operators (not bool only)

1.3.12

- Add infix notation for comparators and math operations with scalars
- `A < B` (creates expression; uses ewise_mult)
- `A + 1` (creates expression; uses apply)
- `A -= 1` (updates A)
- Not valid: `A + B`; the user must choose ewise_add or ewise_mult
- Add `matrix.ss.flatten()` to flatten to a vector row-wise or column-wise
- Add `vector.ss.reshape(nrows, ncols)` to reshape to a matrix row-wise or column-wise
- Add "COOR" and "COOC" format options for importing and exporting matrices
- COOR is coordinate format sorted row-wise
- COOC is sorted column-wise
- Add configuration (via `donfig`) to enable/disable autocomputation of expressions
- For example, `with grblas.config.set(autocompute=True):`
- Change `Recorder()` argument from `record=False` to `start=True`

1.3.11

Lots of big changes and new additions this release!

- Expressions can be used as values
- `expr.new()` is no longer necessary (but is still recommended)
- Methods like `expr.apply(op)` also work
- Indexing `expr[indices]` does not yet work, nor do methods that mutate values
- For example, `A.ewise_mult(A.mxm(A.T).new()).new().reduce_scalar().new()` can now be written as `A.ewise_mult(A.mxm(A.T)).reduce_scalar()`
- Add aggregators to `grblas.agg` that can be used in reductions!
- For example, `matrix.reduce_rows(agg.argmin)`
- Current aggregators: `L0norm, L1norm, L2norm, Linfnorm, all, any, any_value, argmax, argmin, bitwise_all, bitwise_any, count, count_nonzero, count_zero, exists, first, first_index, geometric_mean, harmonic_mean, hypot, last, last_index, logaddexp, logaddexp2, max, mean, min, peak_to_peak, prod, root_mean_square, stdp, stds, sum, sum_of_inverses, sum_of_squares, varp, vars`
- Add prefix scan (such as cumsum and cumprod) that works with any monoid
- `vector.scan(monoid)`
- `matrix.scan_rows(monoid)`
- `matrix.scan_columns(monoid)`
- Add `operator.get_semiring(monoid, binaryop)` convenience function
- Add `x.ss.build_scalar(...)` for Vector and Matrix objects
- Add "coo" as import/export option
- Updated/fixed `to_pygraphblas` and `from_pygraphblas`

1.3.10

- Add Vector inner and outer products
- `v.inner(v, plus_times)`
- `plus_times(v v)`
- Fix computing `A.ss.head()` on iso-valued objects

1.3.9

- Update to SuiteSparse:GraphBLAS 5.1.3
- Add `x.ss.is_iso` to Vector and Matrix objects to indicate whether they are iso-valued

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.