jorisvandenbossche commented on code in PR #41904:
URL: https://github.com/apache/arrow/pull/41904#discussion_r1731352286
##########
python/pyarrow/tests/test_scalars.py:
##########
@@ -102,6 +100,37 @@ def test_basics(value, ty, klass, pickle_module):
assert wr() is None
[email protected]
+def test_basics_np_required(pickle_module):
+ value, ty, klass = np.float16(1.0), pa.float16(), pa.HalfFloatScalar
+ s = pa.scalar(value, type=ty)
Review Comment:
And to answer my own question: because we cannot create a half float scalar
right now from a plain python float:
```
In [7]: pa.scalar(1.0, pa.float16())
...
ArrowTypeError: Expected np.float16 instance
```
OK, you can ignore my comment 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]