You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Micah Kornfield (Jira)" <ji...@apache.org> on 2021/05/12 23:12:00 UTC
[jira] [Created] (ARROW-12769) [Python] Negative out of range
slices yield invalid arrays
Micah Kornfield created ARROW-12769:
---------------------------------------
Summary: [Python] Negative out of range slices yield invalid arrays
Key: ARROW-12769
URL: https://issues.apache.org/jira/browse/ARROW-12769
Project: Apache Arrow
Issue Type: Bug
Components: C++, Python
Affects Versions: 4.0.0, 2.0.0
Reporter: Micah Kornfield
Fix For: 5.0.0, 4.0.1
Tested on pyarrow 2.0 and pyarrow 4.0 wheels. The errors are slightly different between the 2.0. Below is a script from 4.0
This is taken from the result of test_slice_array
{{ }}
{{ >>> import pyarrow as pa}}
{{ >>> pa.array(range(0,10))}}
{{ <pyarrow.lib.Int64Array object at 0x7f59b8bdab20>}}
{{ [}}
{{ 0,}}
{{ 1,}}
{{ 2,}}
{{ 3,}}
{{ 4,}}
{{ 5,}}
{{ 6,}}
{{ 7,}}
{{ 8,}}
{{ 9}}
{{ ]}}
{{ >>> a=pa.array(range(0,10))}}
{{ >>> a[-9:-20]}}
{{ <pyarrow.lib.Int64Array object at 0x7f59b8bdaa00>}}
{{ []}}
{{ >>> len(a[-9:-20])}}
{{ Traceback (most recent call last):}}
{{ File "<stdin>", line 1, in <module>}}
{{ SystemError: <built-in function len> returned NULL without setting an error}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)