You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wenjun Si (JIRA)" <ji...@apache.org> on 2019/06/24 07:19:00 UTC

[jira] [Updated] (ARROW-5703) Arrow cannot serialize complex scalars in numpy

     [ https://issues.apache.org/jira/browse/ARROW-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenjun Si updated ARROW-5703:
-----------------------------
    Description: 
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}

Related github discussions: https://github.com/mars-project/mars/issues/476

  was:
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}



> 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
>            Priority: Minor
>
> 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}
> Related github discussions: https://github.com/mars-project/mars/issues/476



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