GitHub / python-graphblas / python-graphblas
Python library for GraphBLAS: high-performance sparse linear algebra for scalable graph analytics
JSON API: http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-graphblas%2Fpython-graphblas
PURL: pkg:github/python-graphblas/python-graphblas
Stars: 139
Forks: 15
Open issues: 68
License: apache-2.0
Language: Jupyter Notebook
Size: 3.74 MB
Dependencies parsed at: Pending
Created at: about 6 years ago
Updated at: 19 days ago
Pushed at: 22 days ago
Last synced at: 3 days ago
Commit Stats
Commits: 768
Authors: 11
Mean commits per author: 69.82
Development Distribution Score: 0.163
More commit stats: https://commits.ecosyste.ms/hosts/GitHub/repositories/python-graphblas/python-graphblas
Topics: complex-networks, graph-algorithms, graph-analysis, graph-datastructures, graph-theory, graphblas, linear-algebra, numba, pydata, python, python-wrapper, sparse, sparse-data, sparse-matrix, suitesparse
1.3.12
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):
- For example,
- Change
Recorder()argument fromrecord=Falsetostart=True
Download
1.3.11
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 asA.ewise_mult(A.mxm(A.T)).reduce_scalar()
- Add aggregators to
grblas.aggthat 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
- For example,
- 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_pygraphblasandfrom_pygraphblas
Download
1.3.7
1.3.7
- Update to SuiteSparse:GraphBLAS 5.0.3
- Add new SuiteSparse GxB functions:
Matrix.ss.diag,Vector.ss.diag, andgrblas.ss.diagMatrix.ss.splitMatrix.ss.concatandgrblas.ss.concat
- Add sane coercions to operators such as using
expon 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 usepython-suitesparse-graphblasand be compatible
Download
1.3.6
1.3.6
- Update
grblasto be a pure Python package by depending onsuitesparse-graphblas! - Rename
divtocdivin semirings and addtruedivandfloordivin semirings. - Fix monoid attribute of semirings with
land,lor, andlxorto coerce properly. - Don’t allow expressions like
v[w], which previously iterated over the values of Vectorw. - 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.
- Direct the users to e.g.
- 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)
Download
1.3.4
1.3.4
- Add infix sugar for
ewise_plus,ewise_mult,mxm,apply, etc! For example:C << op(A | B) # ewise_plusC << op(A & B) # ewise_multC << op(A @ B) # mxm, vxm, mxvC << op(A) # apply unaryC << op(A, 1) # apply binary, right=1C << op(1, A) # apply binary, left=1
- Operators:
- Add
grblas.opnamespace 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.opnamespace as a monoid.
- Hence, one can use a binaryop from
- Add attributes such as
binop.monoid,monoid.identity, andsemiring.binaryopto operators. - Don’t allow a semiring where a monoid or binaryop is expected (do e.g.
semiring.monoidinstead). - Renamed
grblas.opstogrblas.operator, which defines the base classes of operators.
- Add
- Add
my_matrix.ss.head(n)andmy_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.replacesingleton, so one can do e.g.C(mask, replace) << A.mxm(V). - Add ability to read and write Matrix Market files with
grblas.io.mmreadandgrblas.io.mmwrite. - Allow Scalar, Vector, and Matrix objects to be serialized with pickle.
- Added
__slots__to all the things.
Download
v1.3.3
v1.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_exporttoexportandfast_importtoimport_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
- Renamed
- Matrix and Vector
- allow contains expressions
1 in v, True if there is a value atv[1](1, 2) in A, True if there is a value atA[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
- allow contains expressions
- Scalar
- Add
.shapeattribute (like Vector and Matrix, and like numpy scalars) - Able to cast to float and int
- Allow things like
__eq__where.valueis or computes a scalar
- Add
- Don’t allow
__eq__or__bool__where they don’t make sense
Download