pitrou commented on code in PR #45818:
URL: https://github.com/apache/arrow/pull/45818#discussion_r2135691901


##########
python/pyarrow/tests/test_scalars.py:
##########
@@ -238,13 +249,16 @@ def test_numerics():
     assert repr(s) == "<pyarrow.DoubleScalar: 1.5>"
     assert str(s) == "1.5"
     assert s.as_py() == 1.5
+    assert float(s) == 1.5
+    assert int(s) == 1
 
     # float16
-    s = pa.scalar(0.5, type='float16')
+    s = pa.scalar(np.float16(0.5), type='float16')

Review Comment:
   Actually, NumPy is not needed for this anymore (thanks to the latest changes 
on git main):
   ```suggestion
       s = pa.scalar(0.5, type='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