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

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

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


##########
python/pyarrow/tests/test_sparse_tensor.py:
##########
@@ -489,3 +518,16 @@ def test_pydata_sparse_sparse_coo_tensor_roundtrip(dtype_str, arrow_type):
     assert np.array_equal(sparse_array.coords, out_sparse_array.coords)
     assert np.array_equal(sparse_array.todense(),
                           sparse_tensor.to_tensor().to_numpy())
+
+    sparse_array = sparse.COO.from_numpy([[0, 0], [0, 0]])
+    sparse_tensor = pa.SparseCOOTensor.from_pydata_sparse(sparse_array,

Review Comment:
   Is there a reason why `from_scipy()` and `to_scipy()` is not used here?



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