jraph
jraph copied to clipboard
Added from_scipy_sparse_matrix function
I've added a simple function (together with tests) to convert a scipy sparse matrix into a jraph GraphsTuple as per mentioned in issue #36. Let me know if anything need changes :)
Some future work I'm considering includes making a to_scipy_sparse_matrix function and intermediate functions for NetworkX.
So I've updated sparse_matrix_to_graphs_tuple
to be independent of scipy. Plus, I've implemented it using np.repeat
as you suggested making it not only faster but cleaner as well. Let me know what you think about this @jg8610 :)
So I've updated
sparse_matrix_to_graphs_tuple
to be independent of scipy. Plus, I've implemented it usingnp.repeat
as you suggested making it not only faster but cleaner as well. Let me know what you think about this @jg8610 :)
Hey @jg8610, would be great if you can check this out thanks 😄
Thanks for bearing with me! I think this looks good, if you could resolve the final conflict I'll accept it :)
No worries at all @jg8610 :)
And conflict is resolved!
I've fixed the merge linting errors you mentioned @jg8610. I was a bit surprised that autopep8 did not remove the trailing white spaces in long comments. Probably it is a feature and not a bug.
Let me know if there are any more linting errors :)