Wenjun Si created ARROW-5703:
--------------------------------

             Summary: Arrow cannot serialize complex scalars in numpy
                 Key: ARROW-5703
                 URL: https://issues.apache.org/jira/browse/ARROW-5703
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
    Affects Versions: 0.12.1
         Environment: Miniconda Python 3.7.3
Numpy 1.16.4
            Reporter: Wenjun Si


When serializing complex scalars in Numpy, PyArrow reports an 
ArrowNotImplementedError. This can be reproduced with the code below

{code:python}
import numpy as np
import pyarrow as pa
# this raises ArrowNotImplementedError: Numpy scalar type not recognized
pa.serialize(np.complex128(1+3j))
# this runs ok
pa.serialize(np.array([1+3j]))
{code}

and the stack is

{code}
---------------------------------------------------------------------------
ArrowNotImplementedError                  Traceback (most recent call last)
<ipython-input-3-c5863fa706f3> in <module>
----> 1 pa.serialize(np.complex128(1+3j))

~/miniconda3/lib/python3.7/site-packages/pyarrow/serialization.pxi in 
pyarrow.lib.serialize()

~/miniconda3/lib/python3.7/site-packages/pyarrow/error.pxi in 
pyarrow.lib.check_status()

ArrowNotImplementedError: Numpy scalar type not recognized
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to