-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
I'm not able to cast the float16 type to float32/float64, here is a repro:
>>> import pyarrow as pa
>>> import numpy as np
>>> pa.array(np.array([1, 2.0], dtype='float32')).cast(pa.float64())
<pyarrow.lib.DoubleArray object at 0x7fa67cc56760>
[
1,
2
]
>>> pa.array(np.array([1, 2.0], dtype='float16')).cast(pa.float64())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyarrow/array.pxi", line 816, in pyarrow.lib.Array.cast
File "/home/pgali/anaconda3/envs/cudf_dev/lib/python3.8/site-packages/pyarrow/compute.py", line 297, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 527, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 337, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 120, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from halffloat to double using function cast_double
>>> Reporter: Prem Sagar Gali / @galipremsagar
Related issues:
- [C++] Cast to/from halffloat not implemented (is superceded by)
Note: This issue was originally created as ARROW-13762. Please see the migration documentation for further details.