aboderinsamuel commented on code in PR #50203:
URL: https://github.com/apache/arrow/pull/50203#discussion_r3427123893
##########
python/pyarrow/tests/test_array.py:
##########
@@ -2924,6 +2924,24 @@ def test_array_from_invalid_dim_raises():
pa.array(arr0d)
[email protected]
+def test_fixed_size_list_from_multidim_ndarray():
+ # GH-49644: a fixed-size list can be built from multi-dimensional ndarray
+ # elements by flattening them in C order.
+ arr = pa.array([np.array([[1, 2, 3]]), np.array([[4, 5, 6]])],
+ type=pa.list_(pa.int64(), 3))
Review Comment:
Good call, pinned dtype=np.int64 on the NumPy arrays so the test is
deterministic across platforms (and exercises the int64 fast path rather than
the casting fallback).
--
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]