jorisvandenbossche commented on code in PR #35944:
URL: https://github.com/apache/arrow/pull/35944#discussion_r1244960708


##########
python/pyarrow/tests/test_array.py:
##########
@@ -3347,6 +3347,15 @@ def test_to_pandas_timezone():
     assert s.dt.tz is not None
 
 
+@pytest.mark.pandas
+def test_to_pandas_float16_list():
+    # https://github.com/apache/arrow/issues/36168
+    expected = [[np.float16(1)], [np.float16(2)], [np.float16(3)]]
+    arr = pa.array(expected)
+    result = arr.to_pandas()
+    assert result.tolist() == expected

Review Comment:
   Small comment: this conversion to list and comparing list equality doesn't 
actually check that the correct dtype was created (the individual elements are 
still equal, even when they would for example be float16 vs float32), so maybe 
we can still check the actual dtype, something like `result[0].dtype == 
"float16"`



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to