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

Numpy arrays cannot be created from Arrow Buffers on Python 2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.4.1
    • 0.5.0
    • Python
    • None

    Description

      This can be reproduced by installing pyarrow in Anaconda2 and then running

      In [1]: import pyarrow
      
      In [2]: import pyarrow as pa
      
      In [3]: ba = bytearray(20)
      
      In [5]: b = pa.frombuffer(ba)
      
      In [6]: import numpy as np
      
      In [7]: np.frombuffer(b)
      ---------------------------------------------------------------------------
      AttributeError                            Traceback (most recent call last)
      <ipython-input-7-62b103a5000b> in <module>()
      ----> 1 np.frombuffer(b)
      
      AttributeError: 'pyarrow.lib.Buffer' object has no attribute '__buffer__'
      

      Attachments

        Activity

          People

            pcmoritz Philipp Moritz
            pcmoritz Philipp Moritz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: