kou commented on code in PR #45160:
URL: https://github.com/apache/arrow/pull/45160#discussion_r1903248563


##########
docs/source/index.rst:
##########
@@ -115,6 +115,16 @@ Implementations
    Rust <https://docs.rs/crate/arrow/>
    status
 
+Tensors
+-------
+
+.. _toc.tensors:
+
+.. toctree::
+   :maxdepth: 2
+
+   <python/api/tensors.rst>
+

Review Comment:
   Could you use `docs/source/python/api.rst` not `docs/source/index.rst`?
   



##########
docs/source/index.rst:
##########
@@ -127,3 +137,4 @@ Examples
    Java cookbook <https://arrow.apache.org/cookbook/java/>
    Python cookbook <https://arrow.apache.org/cookbook/py/>
    R cookbook <https://arrow.apache.org/cookbook/r/>
+   

Review Comment:
   Could you revert a needless change?



##########
docs/source/python/api/tensors.rst:
##########
@@ -0,0 +1,114 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+.. or more contributor license agreements.  See the NOTICE file
+.. distributed with this work for additional information
+.. regarding copyright ownership.  The ASF licenses this file
+.. to you under the Apache License, Version 2.0 (the
+.. "License"); you may not use this file except in compliance
+.. with the License.  You may obtain a copy of the License at
+
+..   http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing,
+.. software distributed under the License is distributed on an
+.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.. KIND, either express or implied.  See the License for the
+.. specific language governing permissions and limitations
+.. under the License.
+
+.. currentmodule:: pyarrow
+
+.. _api.tensor:
+
+Tensors
+=======
+
+PyArrow supports both dense and sparse tensors. Dense tensors store all data 
values explicitly, while sparse tensors represent only the non-zero elements 
and their locations, making them efficient for storage and computation.
+
+Dense Tensors
+^^^^^^^^^^^^^
+
+.. autosummary::
+   :toctree: ../generated/
+
+   Tensor
+
+Sparse Tensors
+^^^^^^^^^^^^^
+
+PyArrow supports the following sparse tensor formats:
+
+.. autosummary::
+   :toctree: ../generated/
+
+   SparseCOOTensor
+   SparseCSRMatrix
+   SparseCSCMatrix
+   SparseCSFTensor
+
+"""SparseCOOTensor"""

Review Comment:
   ```suggestion
   SparseCOOTensor
   ^^^^^^^^^^^^^^^
   ```



##########
docs/source/python/api/tensors.rst:
##########
@@ -0,0 +1,114 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+.. or more contributor license agreements.  See the NOTICE file
+.. distributed with this work for additional information
+.. regarding copyright ownership.  The ASF licenses this file
+.. to you under the Apache License, Version 2.0 (the
+.. "License"); you may not use this file except in compliance
+.. with the License.  You may obtain a copy of the License at
+
+..   http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing,
+.. software distributed under the License is distributed on an
+.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+.. KIND, either express or implied.  See the License for the
+.. specific language governing permissions and limitations
+.. under the License.
+
+.. currentmodule:: pyarrow
+
+.. _api.tensor:
+
+Tensors
+=======
+
+PyArrow supports both dense and sparse tensors. Dense tensors store all data 
values explicitly, while sparse tensors represent only the non-zero elements 
and their locations, making them efficient for storage and computation.
+
+Dense Tensors
+^^^^^^^^^^^^^

Review Comment:
   Could you use `---...` like other file?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to