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

[Python] Conversion of numpy array to pyarrow.Tensor: Negative ndarray strides not supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Python
    • None
    • Ubuntu 16.04, python 3.6.6, numpy 1.14.6, pyarrow 0.11.1

    Description

      When indexing a np.ndarray with negative stride, arrow cannot serialize it. However, this could be a common use case for reversing along an axis. 

       

      Code:

      import pyarrow
      import numpy as np
      a=np.zeros([500,600,3])
      b=a[:,:,::-1]
      pyarrow.serialize(b)
      

       

      Error:

      ArrowInvalid Traceback (most recent call last)
      <ipython-input-7-bf252de95dc1> in <module>()
      ----> 1 pyarrow.serialize(b)
      ~/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/pyarrow/serialization.pxi in pyarrow.lib.serialize()
      ~/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
      ArrowInvalid: Negative ndarray strides not supported
      

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhangyuting YUTING ZHANG
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: