You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 38c0fd3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/source/python/data.rst
+74-10Lines changed: 74 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,13 +537,16 @@ schema without having to get any of the batches.::
537
537
538
538
It can also be sent between languages using the :ref:`C stream interface <c-stream-interface>`.
539
539
540
+
Sparse Tensor Classes
541
+
=====================
542
+
540
543
SparseCOOTensor
541
-
===============
544
+
---------------
542
545
543
546
The ``SparseCOOTensor`` represents a sparse tensor in Coordinate (COO) format, where non-zero elements are stored as tuples of row and column indices.
544
547
545
548
Example Usage:
546
-
--------------
549
+
^^^^^^^^^^^^^^
547
550
548
551
.. code-block:: python
549
552
@@ -561,12 +564,12 @@ Example Usage:
561
564
562
565
563
566
SparseCSRMatrix
564
-
================
567
+
---------------
565
568
566
-
`SparseCSRMatrix` represents a sparse tensor in Coordinate (COO) format, where non-zero elements are stored as tuples of row and column indices.
569
+
`SparseCSRMatrix` represents a sparse matrix in Compressed Sparse Row (CSR) format, where non-zero elements are stored in a compressed manner using arrays for data, indices, and indptr.
567
570
568
571
Example Usage:
569
-
--------------
572
+
^^^^^^^^^^^^^^
570
573
571
574
.. code-block:: python
572
575
@@ -581,12 +584,12 @@ Example Usage:
581
584
582
585
583
586
SparseCSCMatrix
584
-
===============
587
+
---------------
585
588
586
589
`SparseCSCMatrix` represents a sparse matrix in Compressed Sparse Column (CSC) format, where non-zero elements are stored in a compressed manner using arrays for data, indices, and indptr.
587
590
588
591
Example Usage:
589
-
--------------
592
+
^^^^^^^^^^^^^^
590
593
591
594
.. code-block:: python
592
595
@@ -600,13 +603,14 @@ Example Usage:
600
603
>>>print(sparse_matrix)
601
604
<pyarrow.SparseCSCMatrix object at 0x7fabcde12345>
602
605
606
+
603
607
SparseCSFTensor
604
-
===============
608
+
---------------
605
609
606
610
`SparseCSFTensor` represents a sparse tensor in Compressed Sparse Fiber (CSF) format, optimized for multi-dimensional sparse data storage.
0 commit comments