Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2714

[C++/Python] Variable step size slicing for arrays

    XMLWordPrintableJSON

Details

    Description

      Array slicing should support variable step sizes

      The current behavior raises an IndexError, e.g.

      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
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              fjetter Florian Jetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m