An open API service providing repository metadata for many open source software ecosystems.

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

Releases
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):
  • Change Recorder() argument from record=False to start=True
about 4 years ago
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 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
about 4 years ago
Download
1.3.10

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
over 4 years ago
Download
1.3.9

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
over 4 years ago
Download
1.3.8

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.
over 4 years ago
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, 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
over 4 years ago
Download
1.3.6

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)
over 4 years ago
Download
1.3.5

1.3.5

  • Add "__weakref__" to __slots__ so objects are weakref-able.
  • Test with Python 3.9
over 4 years ago
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_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.
over 4 years ago
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_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
almost 5 years ago
Download