Graphegon / pygraphblas

GraphBLAS for Python
https://graphegon.github.io/pygraphblas/pygraphblas/index.html
Apache License 2.0
343 stars 27 forks source link

Using lib.* operators in Matrix.reduce_* #60

Open marci543 opened 4 years ago

marci543 commented 4 years ago

Matrix.reducevector() cannot be used with lib.GxB*_MONOID. The problem might be around this line: https://github.com/michelp/pygraphblas/blob/7465ef6fcc77c9901869b70ddf1d77a86570c336/pygraphblas/matrix.py#L598

It would be also good to have a version that supports the BinaryOp variant of reduce_vector.

michelp commented 4 years ago

Hmm, i'll check it out, but meanwhile you can so something like vector_reduce(FP32.PLUS_MONOID) agreed a bout the BinaryOp variant.