binsparse
from_binsparse(array)
Convert a Binsparse tensor from the reference binsparse package into a
Finch tensor which shares its buffers wherever possible.
Dense levels become one Finch DenseLevel per dimension, rank-1 sparse
levels become SparseListLevel, and higher-rank sparse levels become
SparseCOOLevel.
Source code in src/finch/fileio/binsparse.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
to_binsparse(tns)
Convert a Finch tensor to a Binsparse tensor which shares its buffers.
Source code in src/finch/fileio/binsparse.py
52 53 54 55 56 57 58 59 60 61 | |