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

Wes McKinney commented on ARROW-2714:
-------------------------------------

The Tensor classes are independent from the columnar data structures, though 
they reuse pieces of metadata, metadata serialization, memory management, and 
IPC. 

The purpose of adding these to the library was to have in-memory data 
structures for handling Tensor/ndarray data and metadata that "plug in" to the 
rest of the Arrow C++ system (Plasma store, IO subsystem, memory pools, 
buffers, etc.). 

Theoretically you could return a Tensor when creating a non-contiguous slice of 
an Array; in light of the above, I don't think that would be intuitive. 

When we started the project, our focus was creating an open standard for 
in-memory columnar data, a hitherto unsolved problem. The project's scope has 
expanded into peripheral problems in the same domain in the meantime (with the 
mantra of creating interoperable components, a use-what-you-need development 
platform for system developers). I think this aspect of the project could be 
better documented / advertised, since the project's initial focus on the 
columnar standard has given some the mistaken impression that we are not 
interested in any work outside of that. 

> [C++/Python] Variable step size slicing for arrays
> --------------------------------------------------
>
>                 Key: ARROW-2714
>                 URL: https://issues.apache.org/jira/browse/ARROW-2714
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++, Python
>            Reporter: Florian Jetter
>            Priority: Minor
>
> Array slicing should support variable step sizes
> The current behavior raises an {{IndexError}}, e.g.
> {code}
> In [8]: import pyarrow as pa
> In [9]: pa.array([1, 2, 3])[::-1]
> ---------------------------------------------------------------------------
> IndexError Traceback (most recent call last)
> <ipython-input-9-20da5f9ab67a> in <module>()
> ----> 1 pa.array([1, 2, 3])[::-1]
> array.pxi in pyarrow.lib.Array.__getitem__()
> array.pxi in pyarrow.lib._normalize_slice()
> IndexError: only slices with step 1 supported
> {code}



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

Reply via email to