You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/02/13 14:41:00 UTC

[jira] [Commented] (ARROW-2151) [Python] Error when converting from list of uint64 arrays

    [ https://issues.apache.org/jira/browse/ARROW-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362416#comment-16362416 ] 

ASF GitHub Bot commented on ARROW-2151:
---------------------------------------

pitrou opened a new pull request #1602: ARROW-2151: [Python] Fix conversion from np.uint64 scalars
URL: https://github.com/apache/arrow/pull/1602
 
 
   Also add tests for ARROW-1345.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> [Python] Error when converting from list of uint64 arrays
> ---------------------------------------------------------
>
>                 Key: ARROW-2151
>                 URL: https://issues.apache.org/jira/browse/ARROW-2151
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.8.0
>            Reporter: Antoine Pitrou
>            Assignee: Antoine Pitrou
>            Priority: Minor
>              Labels: pull-request-available
>
> {code:python}
> >>> pa.array(np.uint64([0,1,2]), type=pa.uint64())
> <pyarrow.lib.UInt64Array object at 0x7f0e6c1eab88>
> [
>   0,
>   1,
>   2
> ]
> >>> pa.array([np.uint64([0,1,2])], type=pa.list_(pa.uint64()))
> Traceback (most recent call last):
>   File "<ipython-input-70-1b103d3e4574>", line 1, in <module>
>     pa.array([np.uint64([0,1,2])], type=pa.list_(pa.uint64()))
>   File "array.pxi", line 181, in pyarrow.lib.array
>   File "array.pxi", line 36, in pyarrow.lib._sequence_to_array
>   File "error.pxi", line 98, in pyarrow.lib.check_status
> ArrowException: Unknown error: /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:979 code: AppendPySequence(seq, size, real_type, builder.get())
> /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:402 code: static_cast<Derived*>(this)->AppendSingle(ref.obj())
> /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:402 code: static_cast<Derived*>(this)->AppendSingle(ref.obj())
> /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:542 code: CheckPyError()
> an integer is required
> {code}
> More simply, it also fails with a sequence of Numpy uint64 scalars:
> {code:python}
> >>> pa.array([np.uint64(1)], type=pa.uint64())
> Traceback (most recent call last):
>   File "<ipython-input-71-679cb6c34137>", line 1, in <module>
>     pa.array([np.uint64(1)], type=pa.uint64())
>   File "array.pxi", line 181, in pyarrow.lib.array
>   File "array.pxi", line 36, in pyarrow.lib._sequence_to_array
>   File "error.pxi", line 98, in pyarrow.lib.check_status
> ArrowException: Unknown error: /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:979 code: AppendPySequence(seq, size, real_type, builder.get())
> /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:402 code: static_cast<Derived*>(this)->AppendSingle(ref.obj())
> /home/antoine/arrow/cpp/src/arrow/python/builtin_convert.cc:542 code: CheckPyError()
> an integer is required
> {code}



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