You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/02/13 14:17:00 UTC
[jira] [Updated] (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:all-tabpanel ]
Antoine Pitrou updated ARROW-2151:
----------------------------------
Description:
{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}
was:
{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}
> [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
>
> {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)