jorisvandenbossche commented on code in PR #35944:
URL: https://github.com/apache/arrow/pull/35944#discussion_r1236995552
##########
python/pyarrow/tests/test_array.py:
##########
@@ -3347,6 +3347,17 @@ def test_to_pandas_timezone():
assert s.dt.tz is not None
[email protected]
+def test_to_pandas_float16_list():
+ # https://github.com/apache/arrow/issues/36168
+ arr = pa.array([[np.float16(1)], [np.float16(2)], [np.float16(3)]])
+ s = arr.to_pandas()
+ assert s is not None
+ base_refcount = sys.getrefcount(s.values.base)
+ assert base_refcount == 2
Review Comment:
What's the reason for checking the ref count?
I think you can create the expected result using numpy: `expected =
np.array([1, 2, 3], dtype="float16")`, and then check that the result is the
same.
--
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]