You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/12 14:04:17 UTC

[GitHub] [arrow] rok commented on a diff in pull request #14378: ARROW-17933: [C++] SparseCOOTensor raises error when created with zero elements

rok commented on code in PR #14378:
URL: https://github.com/apache/arrow/pull/14378#discussion_r993510724


##########
python/pyarrow/tests/test_sparse_tensor.py:
##########
@@ -434,6 +434,21 @@ def test_sparse_coo_tensor_scipy_roundtrip(dtype_str, arrow_type):
     assert sparse_tensor.has_canonical_format
     assert out_scipy_matrix.has_canonical_format
 
+    scipy_matrix = coo_matrix([[0, 0], [0, 0]])

Review Comment:
   Yeah, coo_matrix automatically ignores zeros, I'll add an assertion checking for number of elements to make this explicit.



-- 
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