forked from python-graphblas/python-graphblas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection to Awkward Arrays (python-graphblas#280)
* Add io.to_awkward method Converts a Vector or Matrix to an Awkward Array. While an Awkward Array elegantly mimics pointers and values, it does not naturally include the indices of a CSR matrix. However, Awkward Arrays handle JSON-like structures of arrays, so we can easily add values, indices, and even labels (in the case of hypersparse), allowing a proper round trip journey from GraphBLAS to Awkward Arrays. Awkward does not support iso-valued objects, so that will be expanded, but yield equivalent information. Awkward Array also does not currently support u64 for indexes, so we are using i64. This should be fine as SuiteSparse:GraphBLAS only allows indices up to 2**60, which means they fit in int64 even though GraphBLAS internally stores them as uint64.
- Loading branch information
Showing
4 changed files
with
244 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters