You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "chilin0525 (via GitHub)" <gi...@apache.org> on 2026/02/13 16:28:23 UTC

[PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

chilin0525 opened a new pull request, #49279:
URL: https://github.com/apache/arrow/pull/49279

   
   ### Rationale for this change
   
   Follow-up from #49147 (comment: https://github.com/apache/arrow/pull/49147#issuecomment-3879302706).
   
   ### What changes are included in this PR?
   
   Add `from_numpy` docstring examples.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   No.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #49279:
URL: https://github.com/apache/arrow/pull/49279#issuecomment-4046489559

   > IIUC docstest checks this, right?
   
   Correct. Though you do not see `tensor.pxi` listed in the doctest ouput, you would see the error under `lib.pyx` (if there would be any error), here:
   
   https://github.com/apache/arrow/actions/runs/21994415489/job/63550273073?pr=49279#step:6:6853.
   
   For example (local test):
   
   ```python
   $ python -m pytest --doctest-cython python/pyarrow/lib.pyx
   ===================================== test session starts =====================================
   platform darwin -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0
   rootdir: /Users/alenkafrim/Repos/arrow/python
   configfile: setup.cfg
   plugins: hypothesis-6.151.6, cython-0.4.0
   collected 306 items                                                                           
   
   python/pyarrow/lib.pyx .........F...................................................... [ 20%]
   ....................................................................................... [ 49%]
   .....................................................F................................. [ 77%]
   ....................................................................                    [100%]
   
   ========================================== FAILURES ===========================================
   _____________________________ [doctest] pyarrow.lib.ChunkedArray ______________________________
   EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
   ??? >>> pa.chunked_array([[2, 2, 4], [4, 5, 100]])
   Differences (unified diff with -expected +actual):
       @@ -1,6 +1,6 @@
       -<pyarrow.lib.ChunkedArray object at ...>
       +<pyarrow.lib.ChunkedArray object at 0x113d84f40>
        [
          [
       -    0,
       +    2,
            2,
            4
   
   /Users/alenkafrim/Repos/arrow/python/pyarrow/lib.cpython-314-darwin.so:None: DocTestFailure
   ________________________________ [doctest] pyarrow.lib.Tensor _________________________________
   EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
   ??? >>> pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"])
   Differences (unified diff with -expected +actual):
       @@ -1,4 +1,4 @@
        <pyarrow.Tensor>
        type: int32
       -shape: (2, 6)
       +shape: (2, 3)
        strides: (12, 4)
   
   /Users/alenkafrim/Repos/arrow/python/pyarrow/lib.cpython-314-darwin.so:None: DocTestFailure
   =================================== short test summary info ===================================
   FAILED python/pyarrow/lib.pyx::pyarrow.lib.ChunkedArray
   FAILED python/pyarrow/lib.pyx::pyarrow.lib.Tensor
   ================================ 2 failed, 304 passed in 0.98s ================================
   
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF merged PR #49279:
URL: https://github.com/apache/arrow/pull/49279


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49279:
URL: https://github.com/apache/arrow/pull/49279#issuecomment-4049585559

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 3c5825b30dbb5a897a903034c12ce6ece664c560.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/66856552167) has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49279:
URL: https://github.com/apache/arrow/pull/49279#issuecomment-3898323650

   Revision: 4236f9d810a996fed7063ea17d7d128e3349a846
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-f384df4d75](https://github.com/ursacomputing/crossbow/branches/all?query=actions-f384df4d75)
   
   |Task|Status|
   |----|------|
   |preview-docs|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f384df4d75-github-preview-docs)](https://github.com/ursacomputing/crossbow/actions/runs/21995774260/job/63555220747)|


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on PR #49279:
URL: https://github.com/apache/arrow/pull/49279#issuecomment-3898313347

   @github-actions crossbow submit preview-docs


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49278: [Python][Doc] Add from_numpy examples for sparse tensor constructors [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #49279:
URL: https://github.com/apache/arrow/pull/49279#issuecomment-4046575538

   Note: opened an issue to update the documentation so that it is clear `.pxi` files are included into `lib.pyx`, see: https://github.com/apache/arrow/issues/49503


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org