Skip to content

Numpy arrays cannot be created from Arrow Buffers on Python 2 #17011

@asfimport

Description

@asfimport

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__'

Reporter: Philipp Moritz / @pcmoritz
Assignee: Philipp Moritz / @pcmoritz

Note: This issue was originally created as ARROW-1216. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions